Mobile App Tracking

NOTE: at this time, the integration works only for install events and NOT for update and in-app events.


how it works

Copy link to clipboard

Since GameAnalytics focuses exclusively on analytics, it only provides the analytics technology and relies on MobileApplicationTracking (MAT) for the user acquisition campaign attribution itself. This article explains how install information reaches the GameAnalytics servers and gets attributed to players who are already tracked with GameAnalytics.

The GA – MAT integration works through MAT notifying GameAnalytics of installs through the GameAnalytics REST API and creating / updating a user profile. Note that you will need to set up a server postback in your MobileAppTracking account for each of your mobile games that you want to use with GA and MAT. This postback is used to send install notifications about a user profile to the GA servers.

Are you new to mobile acquisition tracking? See this introductory article on the MAT website.



Copy link to clipboard

Creating a Mobile App in MAT

Copy link to clipboard

In order to submit information from MAT to GameAnalytics, you first need to set up a Mobile App definition, along with its associated offers, in MAT. Each mobile app can have multiple advertising offers. Select Mobile Apps from the Applications tab:

Click the Add Mobile App button to start configuring a new Mobile App for MAT.

MAT will prompt you to provide the Mobile App type, the name to be displayed in the MAT interface, the official package name / store app ID and the download URL for the App. Installs will be tracked by default for any Mobile App. If you wish to track additional events for your mobile app, you may add them during the Mobile App setup. Depending on the type of Mobile App you choose, you may have to provide other details as well. For more information, please visit the Mobile App section on the MAT support website.


Sending Install Notifications

Copy link to clipboard

Sending install information is essential if you want to unlock a more granular analysis in GameAnalytics. In order to send attribution information to GameAnalytics, you will need to:

  1. Define GameAnalytics as an internal publisher
  2. Setup a server postback in your MAT interface that will send GameAnalytics the following information about each install.
GA user event Explanation Required Recommended MAT placeholder
install_publisher The name of the ad publisher. For example: Facebook, Chartboost, Google Adwords, etc. Yes {sub_publisher}
install_site The website or app where the ad for your game was shown. For example:, Candy Crush Saga, etc. Yes {sub_site}
install_campaign The name of your campaign. A campaign may contain multiple ads and span across publishers. For example: Launch, ChrismasSpecial, etc. Yes {sub_campaign}
install_adgroup Groups together multiple ads. For example: Item Offers, Signup Offers, Hero Offers, etc. No {sub_adgroup}
install_ad The ID of the specific ad that was clicked. For example: Add#239823, KnutsShinyAd Yes {sub_ad}
install_keyword Any keyword that is relevant for you. For example: “rts mobile game” No Any field you find relevant
country The country for the particular user Yes {country_code}
ios_ifa, ios_ifv and odin Used to populate the ios_id field on the GA servers, based on device settings Yes {ios_ifa}, {ios_ifv}, {odin}
android_id, google_aid A 64-bit number (as a hex string) that is randomly generated on the device’s first boot and should remain constant for the lifetime of the device. No {android_id}, {google_aid_lower}

As you can see, you can choose from multiple MAT placeholders to populate the GameAnalytics user event fields. Please see MAT’s Best Practices for Tracking Links for more information on when you should use sub-placeholders.

If you know exactly what you are doing, the complete list of placeholder parameter names can be found by clicking the “Optional Parameters” link under where you set the URL in the MAT options.



Defining GameAnalytics as a Partner

Copy link to clipboard

Before you create the API URL, create an internal partner in MAT and name it “GameAnalytics”. In order to do this, access the Partners section in the Partners tab:

Then press the Add Internal Partner button Image6_MAT

In this way other partners or third-parties won’t see or have access to your logs for server postbacks via the MAT alpha partner interface.


Setting Up the Server Postback URL

Copy link to clipboard

In your MAT dashboard, go to the Partners tab and click the Postback URLs subtab.

Click the Add Postback URL button to start configuring a new server postback.

Paste the postback URL below into the URL field in order to notify GameAnalytics about acquisition information for your iOS and/or Android apps.{base64_encode({"install_publisher":"{sub_publisher}","install_site":"{sub_site}","install_campaign":"{sub_campaign}","install_adgroup":"{sub_adgroup}","install_ad":"{sub_ad}","install_keyword":"{sub_keyword}","country":"{country_code}","ios_ifa":"{ios_ifa}","ios_ifv":"{ios_ifv}","odin":"{odin}","android_id":"{android_id}","google_aid":"{google_aid_lower}"})}

NOTE: Don’t forget to replace GAMEANALYTICS_GAME_KEY above with the public key that GameAnalytics provides when you create your account. It is located in your Game Settings.

In order to distinguish the paid from the organic users you need to instrument postback URL fields with not-null values using MAT internal macros. The fields of interest are:

  • install_publisher
  • install_site
  • install_campaign
  • install_adgroup
  • install_ad
  • install_keyword

If all the fields above are empty GameAnalytics will consider the event as one from an organic user. Next, select the Mobile App that you want to associate to this Postback URL and then make sure that information is fired to the postback URL on install events. Also, make this postback URL available only for the GameAnalytics internal publisher. If All Publishers is selected then any publisher or third-party will have access to the logs of your server postbacks. That is why the Data All option was created, to replace the All Publishers setting so that to server postback logs can be limited. If you want everybody to have access to your server postback logs, then you can use the All Publishers option even though its not recommended.

As GameAnalytics only accepts POST requests, click on Advanced Settings and select POST as the HTTP method and “querystring” as the HTTP POST Type Data.

Also you will need to enter in OK for the Result Validation-Should Contain field and ERROR for the Result Validation-Should NOT Contain field.

If you have set up everything correctly, on each install the MAT engine will generate the server postback URL by replacing the placeholders with values. The final notification URL will look similar to this:

For more details, please read the How to Setup Server Postbacks section on the MAT support website.

Contact support

Any queries about the platform are welcome.

Give article feedback

Let us know what you think about the articles.