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