Creating a tracker for pre-installs
Pre-installs are apps installed on a device without direct user involvement. AppMetrica offers two methods for tracking these installs:
-
OEM pre-installing: The tracking URL is embedded in the APK that the manufacturer installs on the device before selling it. For more information, see Apps pre-installed by the device manufacturer or retailer.
-
PAI (Play Auto Install): AppMetrica generates a unique tag that the manufacturer inserts into the app store URL (only for Android). For more information, see Pre-installing apps with PAI (Google Play Auto Install).
Trackers created for pre-installed apps are only available as part of pre-install campaigns. They can't be used in regular campaigns or re-used in other OEM/PAI pre-installs.
Step 1. Choosing a technology
Determine which scenario applies to your campaign:
- OEM: The app is pre-installed as part of the device's firmware or build.
- PAI: The app is pre-installed via Play Auto Install.
Step 2. Creating a tracker
-
In the AppMetrica interface, go to Tracking → Add tracker.
-
Enter the name of the tracker.
-
Select a media source to attribute clicks, installs, and conversions to.
If the media source isn't in the list, add a new source.
Once the tracker has been created, you can't change the media source in the settings.
-
Specify Pre-installing as the tracker type.
-
Enable or disable the PAI (Play Auto Install) option based on your chosen technology.
Step 3. (Optional) Setting up postbacks
Trackers for pre-installs support postbacks that automatically send data about successful conversions to media sources. You can add up to five postbacks to one tracker. Use media source templates or configure custom URLs with macros.
Step 4. Obtaining UTM tag and tracking ID
- If you have the PAI option enabled, click Generate to obtain a unique
utm_campaign
tag. - If you're using OEM pre-installing and have the PAI option disabled, a
tracking_ID
appears on the right.
Step 5. What's next?
If you're using PAI, send the UTM tag to your media source or manufacturer so they can use it on Google Play.
If you're using OEM pre-installing, configure the AppMetrica SDK:
Tracking pre-installed apps is available when using the extended configuration of the AppMetrica library. To set parameters for tracking pre-installed apps, follow these steps:
-
Create an object with the necessary tracking parameters:
public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); // Creating an instance of a constructor for app pre-installation information. PreloadInfo.Builder preloadInfoBuilder = PreloadInfo.newBuilder(tracking_ID); // Creating an instance of information about app pre-installation. PreloadInfo preloadInfo = preloadInfoBuilder.build();
-
Create the extended configuration of the AppMetrica library and enter parameters for tracking pre-installed apps. Then perform library initialization in the app, using the extended configuration.
public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); // Creating an extended library configuration. AppMetricaConfig.Builder configBuilder = AppMetricaConfig.newConfigBuilder(API_key); // Setting necessary parameters (for example, enabling logging). configBuilder.setLogEnabled(); // ... // Setting tracking parameters for pre-installed apps. configBuilder.setPreloadInfo(preloadInfo); // Creating an extended configuration instance. AppMetricaConfig extendedConfig = configBuilder.build(); // Initializing the AppMetrica SDK. AppMetrica.activate(getApplicationContext(), extendedConfig); } }
Initialize the AppMetrica SDK this way for all the app processes.
-
Use the method of the
AppMetrica
class to enable tracking user activity:... AppMetrica.enableActivityAutoTracking(this);
Tracking pre-installed apps is available when using the extended configuration of the AppMetrica library. To set information for tracking pre-installed apps, follow these steps:
-
Create an object with the necessary tracking parameters:
AMAAppMetricaPreloadInfo *preloadInfo = [[AMAAppMetricaPreloadInfo alloc] initWithTrackingIdentifier:@"tracking_ID"];
-
Create the extended configuration of the AppMetrica library and set information in it for tracking pre-installed apps. Then perform library initialization in the app, using the extended configuration.
// Creating an extended library configuration. AMAAppMetricaConfiguration *configuration = [[AMAAppMetricaConfiguration alloc] initWithApiKey:@"API_key"]; // Setting up the configuration. configuration.preloadInfo = preloadInfo; // ... // Initializing the AppMetrica SDK. [AMAAppMetrica activateWithConfiguration:configuration];
-
Create an object with the necessary tracking parameters:
let preloadInfo = AppMetricaPreloadInfo.init(trackingIdentifier: "tracking_ID")
-
Create the extended configuration of the AppMetrica library and set information in it for tracking pre-installed apps. Then perform library initialization in the app, using the extended configuration.
// Creating an extended library configuration. let configuration = AppMetricaConfiguration.init(apiKey: "API key") // Setting up the configuration configuration?.preloadInfo = preloadInfo // ... // Initializing the AppMetrica SDK. AppMetrica.activate(with: configuration!)
Parameter | Description |
---|---|
API_key |
A unique app ID issued in the AppMetrica web interface at app registration. |
tracking_ID |
A numeric tracker ID that is shown in the AppMetrica interface when creating a tracker. |
If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.