Cocos Creator API

1.4.x

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

ProtocolAdTracking

Extends PluginProtocol
Module: anysdk

ad tracking protocol

Methods

onPay
(
  • productInfo
)

Call this method if you want to track register events as happening during a section.

name type description
productInfo Object

Type: map

onLogin
(
  • userInfo
)

Call this method if you want to track register events as happening during a section.

name type description
userInfo Object

Type: map

onRegister
(
  • userId
)

Call this method if you want to track register events as happening during a section.

name type description
userId String

trackEvent
(
  • eventId
  • paramMap
)

Call this method if you want to track custom events with parameters as happening during a section.

name type description
eventId String
paramMap Object

Type: map

onCreateRole
(
  • userInfo
)

Call this method with parameters if you want to create role as happening during a section.

name type description
userInfo Object

Type: map

onLevelUp
(
  • info
)

Call this method if you want to track levelup events with parameters as happening during a section. Before to invoke, you need to verdict whether this properties existed

name type description
info Object

Type: map

onStartToPay
(
  • info
)

Invoke this method with parameters if you want to start to pay as happening during a section. Before to invoke, you need to verdict whether this properties existed

name type description
info Object

Type: map

isFunctionSupported
(
  • functionName
)
boolean

Inherited from PluginProtocol:

Check whether the function is supported

name type description
functionName String

returns:

type: boolean

getPluginName ( ) String

Inherited from PluginProtocol:

get plugin name

returns:

type: String

getPluginVersion ( )