What you need BEFORE you can start
- App Analytics SWC
To be able to track your application using appAnalytics you need to login to the web interface and download the AS3 classes. You will need to include the SWC in your project just as you would any other SWC. Note: you need to have an appAnalytics account before you can download the SWC. - API Key
Your API key is the key that allows you to access appAnalytics. Your key is unique for you so don’t use someone else’s as it wont work. Your API Key can be found on the top nav under the page called “API Key” - App ID
This is the other piece you will need to get appAnalytics working in your application. The App ID can be found in the dashboard in the applications table by the app name.
If you have issues with tracking not working, 99% of them can be solved by checking that you have this stuff right. The solution is designed so that API keys and App IDs work together – any mucking around with them will cause the solution to fail by design. This is a security feature to prevent a variety of things which we aren’t going into :)
Putting It together in AS3
- Import appAnalytics
To Start appAnalytics you first need to import the class at the top of your code:import com.appAnalytics.AppAnalytics; import com.appAnalytics.AppAnalyticsType;
- Start appAnalytics
To Initialize appAnalytics just call:AppAnalytics.start(['API Key','App ID', true/false])
Use true as the third param if you wan to see App Analytics debug trace’s
- Tracking an Item
Once you have started appAnalytics (see above), you can call appAnalytics from anywhere in your application with just one line of code:AppAnalytics.track(["page/home", AppAnalyticsType.PAGE]);
This is a page track. The first param is the action or the item you wish to track, and the second is a type. Types allow you define exactly what the content is, and are customizable. As no two applications are the same, we have allowed you to create you own type. We have provided you with 4 common types that we think people will generally use in every application they are:
“page” for page view: AS3 Quick Ref =
AppAnalyticsType.PAGE
“click” for any button click you want to track: AS3 Quick Ref =
AppAnalyticsType.CLICK“url” for those links to external URLs: AS3 Quick Ref =
AppAnalyticsType.URL
“error” Yes… for those unwanted errors… now you can see how many and when the appear: AS3 Quick Ref =
AppAnalyticsType.ERRORYou may elect to send through a description (as a string) as a third parameter, however this is optional. While the tracking code supports the passing of an array, these are the only parameters currently process and recorded by the tracking engine (more will be added later – hence the array).
Support is available for any issue on our hosted support forum at GetSatisfaction. We try to do “same day” responses, but given the world is a large place and timezones play a role – these may happen overnight.




Recent Comments