Skip to main content
APK Tracking Implementation

APK Tracking Implementation

Updated over a week ago

At a Glance: This article will walk you through the ways of implementing APK tracking and understanding how it works.

Ways to Implement APK Tracking

1) Hardcoding the Partner Side ID

Each advertiser or app owner must hardcode their unique Partner Site ID inside their APK file before distribution. This ensures accurate attribution to the respective partner.

Tracking Link Implementation

The tracking link should include the android_r parameter with the partner’s hosted APK file URL.

Format:

https://click.trackier.io/c/APP_ID?pid={PARTNER_ID}&lbw=7d&android_r={APK_URL}

Example:

https://click.trackier.io/c/APP_ID?pid=12345&lbw=7d&android_r=https://downloads.apptrove.com/dl/apptrove_partner_1.apk


How It Works:

  • The user clicks the tracking link.

  • The system records the click and partner details.

  • The user is redirected to download the partner’s APK.

  • Upon installation and the app opening, the system attributes the installation to the Partner Site ID.

App-Side Implementation Code:

val sdkConfig = TrackierSDKConfig(applicationContext(), TR_SDK_KEY, "development") val attributionParams = AttributionParams(parterId = "kFyW2bEizc") // pass partner ID sdkConfig.setAttributionParams(attributionParams) TrackierSDK.initialize(sdkConfig)


2) Place Trackier ID as Part of the Application URL

This method retrieves the click ID from the file path post-installation. Users must grant file manager access for this method.

Tracking Link Example:

https://downloads.apptrove.com/dl/apptrove_{trackier_id}.apk
  • The app scans the download folder for its APK.

  • Extract the click ID from the file name (e.g., apptrove_CLICK12345.apk).

App-Side Implementation Code:

TrackierSDKConfig sdkConfig = new TrackierSDKConfig(this, TR_SDK_KEY, "development"); sdkConfig.setManualMode(true); TrackierSDK.setLocalRefTrack(true, "_"); TrackierSDK.initialize(sdkConfig);


Permissions Required in AndroidManifest:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

After Permissions Are Granted:

TrackierSDK.fireInstall();


3) IP-Based Tracking

When deterministic identifiers are unavailable, IP-based tracking matches clicks and installs using IP addresses.

How It Works:

  • Captures IP address on click.

  • Captures IP address on install.

  • Attributes the install if both IPs match (must be the same version, IPv4 or IPv6).

Note:

  • IPv4 click → IPv4 install = Success

  • IPv6 click → IPv6 install = Success

  • IPv4 click → IPv6 install = Fail (no match)



We are delighted to have assembled a world-class team of experienced professionals who are ready to take care of your queries and answer any questions you may have.
Feel free to reach out to us at any time by emailing us at support@apptrove.com or by using the in-platform chat feature. We'd love to hear from you!


Did this answer your question?