As of the latest version of the Moai SDK (0.4, revision 11), Apsalar has been implemented for your use. Find out how using Apsalar can help track developer-defined user events.

With the latest release of the Moai SDK 0.4 Beta (revision 11), the Apsalar Lua module has been included. With Apsalar, you are able to define and track the execution of events in your applications. You can then use Apsalar's ApScience analytics to categorize and visualize the points of data.


Using Apsalar

Signing up for Apsalar through Moai is just as simple as the Tapjoy signup is. During your initial Moai account creation, there is a button for one-touch signup for Apsalar. Click that, and your account has been created! Now that your account has been created, you'll need to obtain your API key and your Secret key. In order to get these, log into your Apsalar account (either through the Apsalar website, or through the convenient links under Partner Services on the Moai Cloud Dashboard) , click on “Get the SDK” located on the top right of the screen. This will take you to a screen where you can find both your API and Secret Key. These keys are not game specific; you will use them in every application you use Apsalar. Now, to integrate Apsalar into your application, you’ll need to include three lua modules (apsalar.lua, url.lua, util.lua) found in the “include -> lua-modules” folder of your Moai SDK. Once those are included you just need to require “apsalar” and then in your code add the following:

apsalar.start ( “API Key”, “secret key”) 

This will get you connected to your Apsalar account. After you run apsalar.start () it’s as simple as creating an event whenever your action is called. This is done with the apsalar.event function.

 apsalar.event ( “Event Name”, { data (optional) } ) 

This will create an event, store it in a queue, and wait for you to send it. Once you have your events, you will then send out them out to Apsalar. This is done with the following lines of code taken from our sample file included in the SDK.

 local queue = apsalar.getQueue()
queue:send ( x )

Where “x” is the amount of events you wish to send at this time. If you leave it blank, it will sent the entire queue.

Events

Now that you've created events and sent them to Apsalar, what does that actually do for you? There are a number of things you can do with events in Apsalar's ApScience. When you create events in your apps, they are registered with Apsalar; you don't need to register anything on Apsalar's website for the events to be counted. The event will then be associated with a specific application name and OS. Note that Apsalar does not assume anything about your events. All that Apsalar does is offer several ways to interpret the data. You define everything. With these events, you're able to see raw data like how many times the events have been accessed, and when they were accessed. One of Apsalar's features is the Funnel Analysis. By using a funnel, a developer can see how many times each step towards a goal in the funnel has been taken by your users. For example, let's say you create a funnel of the following events: VisitGameMenu -> VisitGameStore -> VisitItemList -> CompletePurchase. The Funnel will show how many people have completed each event, will track how they got there (if they followed the funnel) and will help you to visualize how people are navigating through your game, potentially discovering problem areas where users are dropping out of the funnel. (images courtesy of Apsalar)

Closing

The Funnel Analysis is just one of the many services that Apsalar offers. Apsalar's dashboard also offers the ability to see what devices, carriers, and platforms are being used by your users, as well as geographic tracking. If you would like more information on Apsalar, visit their website at www.apsalar.com, or if you are looking for more specific, in-depth information on all of the ways ApScience uses the points of data, visit their very thorough documentation at https://apsalar.com/documentation/