Cocos Creator API

1.4.x

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

ProtocolAnalytics

Extends PluginProtocol
Module: anysdk

analytics protocol

Methods

startSession ( )

Start a new session.

stopSession ( )

Stop a session.

setSessionContinueMillis
(
  • millis
)

Set the timeout for expiring a session.

name type description
millis Number

Type: long

logError
(
  • errorId
  • message
)

log an error

name type description
errorId String
message String

logEvent
(
  • errorId
  • [args ]
)

log an event.

name type description
errorId String
args optional Object

optional arguments Type: map

logTimedEventBegin
(
  • eventId
)

Track an event begin.

name type description
eventId String

logTimedEventEnd
(
  • eventId
)

Track an event end.

name type description
eventId String

setCaptureUncaughtException
(
  • enabled
)

set Whether to catch uncaught exceptions to server.

name type description
enabled boolean

setAccount
(
  • paramMap
)

analytics account information

name type description
paramMap Object

Type: map

onChargeRequest
(
  • paramMap
)

track user to request payment

name type description
paramMap Object

Type: map

onChargeSuccess
(
  • orderID
)

track Successful payment

name type description
orderID String

onChargeFail
(
  • paramMap
)

track failed payment

name type description
paramMap Object

Type: map

onChargeOnlySuccess
(
  • paramMap
)

track Successful payment

name type description
paramMap Object

Type: map

onPurchase
(
  • paramMap
)

track user purchase

name type description
paramMap Object

Type: map

onUse
(
  • paramMap
)

track user to use goods

name type description
paramMap Object

Type: map

onReward
(
  • paramMap
)

track user to reward goods

name type description
paramMap Object

Type: map

startLevel
(
  • paramMap
)

start level

name type description
paramMap Object

Type: map

finishLevel
(
  • levelID
)

finish level

name type description
levelID String

failLevel
(
  • paramMap
)

failed level

name type description
paramMap Object

Type: map

startTask
(
  • paramMap
)

start task

name type description
paramMap Object

Type: map

finishTask
(
  • taskID
)

finish task

name type description
taskID String

failTask
(
  • paramMap
)

failed task

name type description
paramMap 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 ( ) String

Inherited from PluginProtocol:

get plugin version

returns:

type: String

getSDKVersion ( ) String

Inherited from PluginProtocol:

get SDK version

returns:

type: String

callFuncWithParam
(
  • funName
  • [args ]
)

Inherited from PluginProtocol:

void methods for reflections with parameter

name type description
funName String
args optional Object | anysdk.PluginParam

optional arguments

callStringFuncWithParam
(
  • funName
  • [args ]
)
String

Inherited from PluginProtocol:

String methods for reflections with parameter

name type description
funName String
args optional Object | anysdk.PluginParam

optional arguments

returns:

type: String

callIntFuncWithParam
(
  • funName
  • [args ]
)
Number

Inherited from PluginProtocol:

int methods for reflections with parameter

name type description
funName String
args optional Object | anysdk.PluginParam

optional arguments

returns:

type: Number

Type:int

callBoolFuncWithParam
(
  • funName
  • [args ]
)
boolean

Inherited from PluginProtocol:

boolean methods for reflections with parameter

name type description
funName String
args optional Object | anysdk.PluginParam

optional arguments

returns:

type: boolean

callFloatFuncWithParam
(
  • funName
  • [args ]
)
Number

Inherited from PluginProtocol:

float methods for reflections with parameter

name type description
funName String
args optional Object | anysdk.PluginParam

optional arguments

returns:

type: Number

Type:float

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index