Setup

Download the SDK from: https://github.com/cooladata/cooladata-actionscript

 

Flash Development

  1. Add the cooladata-sdk-ac3-x.x.x.swc to the lib folder of your project.
  2. Right-click the file and choose “Add To Library”.

 

Adobe CS4 (and above)

  1. Save the cooladata-sdk-ac3-x.x.x.swc in a folder that is accessible to CS4.
  2. Go to the Publish Settings menu.
  3. Click on the Settings button.
  4. Click on the SWC file icon.
  5. Browse to the location of the cooladata-sdk-ac3-x.x.x.swc file.
  6. Select the cooladata-sdk-ac3-x.x.x.swc file.

In order to use CoolaDataTracker SDK for reporting events, it must be initialized first using the setup method:

CoolaDataTracker
 .getInstance()
 .setup(apiToken:String,serviceEndPoint:String,userId:String,sessionId:String);

Example:

CoolaDataTracker
 .getInstance()
 .setup("3r783b097dde47b592cd48697073b6dc" ,"https://api.cooladata.com" , "uid_12345","sid_12345");

 

Sending Events

After the Cooladata Tracker SDK is properly set up, you are ready to report events from your application. To start doing so, you need to call the trackEvent function with suitable parameters on every user’s action that you would like to track.

Example:

var paramsDictionary:Dictionary = new Dictionary();
paramsDictionary["paramName"] = "paramValue";
CoolaDataTracker.getInstance().trackEvent(eventNameTextInput.text, null, null, paramsDictionary, null, null);

 

Sending Event with Parameters:

var paramsDictionary:Dictionary = new Dictionary();

paramsDictionary["paramName"] = "paramValue";

CoolaDataTracker.getInstance().trackEvent(eventNameTextInput.text, null, null, paramsDictionary, null, null);

 

Parameters Descriptions:

Parameter NameTypeMandatoryDescription
eventNameStringYesThe name of the event to report.
userIdStringYesThe User ID relevant for this event. You must provide the userId either in the setup method or in the trackEvent method. This parameter is optional only if provided in the setup method.
sessionIdStringNoThe Session ID relevant for this event.
eventIdStringNoAn ID of the event.
dictionaryDictionaryNoThe custom properties to be sent with the event.
callBackFunctionBooleanNoA CoolaDataDeliveryResult type result that will be returned when the data is sent.

Print Friendly, PDF & Email