Appnext Tracking SDK for Android

The Tracking SDK tracks your app installs, when you promote your apps with Appnext.
You can also use the tracking SDK to send Appnext post-install analytics on your users. This will allow you to measure the quality of the users you’ve acquired through Appnext, analyze the effectiveness of your ad campaigns, and improve ad performance.

Appnext Account & ID

1. Register for an Appnext Account
You must first create an account with Appnext to be able to use this ad unit’s features.
If you do not have an Appnext account, copy the following URL to the browser: and sign up

2. Get a Unique ID.
To get started, add a new App via the Appnext Self-Service Platform, then copy the Placement ID, which can be found in your account at:
Apps -> Settings Icon-> Settings & Placements -> Placement ID

Unique ID
A unique ID called a “Placement ID” is required for all inbound requests. A Placement ID is a 32- character string generated by Appnext for every registered app.

Tracking SDK Integration

(Updated on 01/05/2018)



Integrate the latest version of Google Play Services, in your app. Instructions can be found here

Step 1: Add the Appnext Tracking SDK to Your Project

Using Gradle

Before updating a new SDK version, it is recommended to clear the Gradle cache and recompile the project.

Define in the root level gradle of the project.
You need to paste to the project gradle (Project integration App)

allprojects {
  repositories {
  maven { url "" }

Define in the module build.gradle
You need to paste to the module gradle (Module App)

dependencies {


Manual Installation (Not Recommended)

Download the AAR file
Download the AAR file from here.

Add the SDK to Your Project
Extract the zip file and add the AppnextTrackingSDK.aar to your "libs" folder in your project.

Add the following code to the project's build.gradle

allprojects {
   repositories {
      flatDir {
        dirs 'libs'

Add the following code to the module's build.gradle

dependencies {
  compile(name:'trackingSDK.aar', ext:'aar') // Mandatory

Update the ProGuard Configuration

-keep class com.appnext.appnextsdk.** { *; }

Using AAR as JAR file
If using JAR file is required, rename the trackingSDK.aar file to Extract the classes.jar file and rename it to trackingSDK.jar.

You can now place the renamed JAR file in the /libs folder in your project. Make sure the IDE is updated accordingly. You need to manually add the permissions and services into your AndroidManifest.xml file. The required permissions and services can be found in the Android manifest file that is included in the AAR file.

Please note that Appnext SDK supports Intelij Android Studio only. If you are coding in Eclipse, using AAR as a JAR file could work, but it won't be supported by our Integration and Support teams.


We will only track installs that come from Appnext ads, and will not count installs from other sources.

Step 2: Add Tracking Code

And add this code to your first activity (or to your application class if you have one)


Integration Support
Should you have any problems integrating the product, log a ticket with us by emailing [email protected].

Step 3: Add Post- installs events (Optional)

In order to measure the quality of your acquired users, you can pass Appnext up to 5 Post-Install events from your app. (In-app purchases, engagement and retention events,...).
Post-install events data will be displayed in the Appnext platform next to each campaign in the Manage Campaigns screen and next to each publisher app in the campaign’s detailed reporting screen.

Add Appnext post-installs events using this code:

AppnextTrack.postInstall(context, "action");

Change "action" field with the action name you want for your post installs

Integration Support
Should you have any problems integrating the product, log a ticket with us by emailing [email protected].