FAQ and troubleshooting

Creating an app

Should I use different API keys for the same app on different platforms?

We recommend using the same API key for the same app on different platforms. This ensures a more convenient presentation of the general app statistics for a given platform and enables the use of smartlinks in trackers.

SDK integration

How do I ensure that I have the latest versions of the Android libraries installed?

To ensure that you have the latest versions of the AppMetrica SDK and AppMetrica Push SDK libraries installed, follow these steps:

  1. In the Android Studio menu bar, select AnalyzeRun Inspection By Name.
  2. In the window that opens, type in and then select Newer Library Versions Available.
  3. Select the libraries to update.

How do I update the AppMetrica version in the app?

To update the version of the AppMetrica SDK library:

  1. Edit the library version in the build.gradle file.
  2. Initialize the library in the app.

For more information, see Installation and initialization.

  1. Edit the library version in your project's Podfile.
  2. Initialize the library in the app.

For more information, see Installation and initialization.

How do I enable user location sending?

AppMetrica can determine the location of a device. Location accuracy depends on the configuration that the library uses for initialization:

With the locationTracking option enabled

Note

For iOS, the option is enabled by default, but the AppMetrica SDK doesn't request permission to access location data. You should implement this using the methods of the CLLocationManager class.

Location is determined down to the city level. You can retrieve the information in reports and via the Logs API.

The app requests GPS access. Battery consumption may increase.

With the locationTracking option disabled

Note

Starting with the Android AppMetrica SDK 5.0.0, the locationTracking option is disabled by default.

If the version is lower than 5.0.0, the locationTracking option is enabled by default.

The location is determined by the IP address with accuracy to the country. You can retrieve the information in reports but not the Logs API.

The app requests GPS access. Battery consumption does not increase.

Note

If you have IP address masking enabled, AppMetrica determines the location with country-level accuracy using the unmasked part of the IP address.

See examples in Determining the location.

"Library Not Found" error when you launch the app on your device

The error occurs because Xcode cannot sign the libraries that SPM provides. There is a task to fix in the SPM project, but at the moment it is not solved.

To resolve this problem, follow this sequence of steps:

  1. At the build stage of your app, add a step to copy files.

  2. For Destination select Frameworks.

  3. Add a step to run the script.

  4. Add the script. The script will sign the libraries that SPM provides.

    find "${CODESIGNING_FOLDER_PATH}" -name '*.framework' -print0 | while read -d $'\0' framework
    do
    codesign --force --deep --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --preserve-metadata=identifier,entitlements --timestamp=none "${framework}"
    done
    

Error installing library on the device

During library installation, the error specified below may occur (example log). To solve the problem, follow the steps in "Library Not Found" error when launching the app on the device.

Example log
Details

Unable to install "Your App"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
--
A valid provisioning profile for this executable was not found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info: {
    DVTRadarComponentKey = 487925;
    MobileDeviceErrorCode = "(0xE8008015)";
    "com.apple.dtdevicekit.stacktrace" = (
	0   DTDeviceKitBase                     0x00000001212d493f DTDKCreateNSErrorFromAMDErrorCode + 220
	1   DTDeviceKitBase                     0x0000000121313124 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
	2   DVTFoundation                       0x000000010576db33 DVTInvokeWithStrongOwnership + 71
	3   DTDeviceKitBase                     0x0000000121312e65 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
	4   IDEiOSSupportCore                   0x0000000121183d28 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
	5   DVTFoundation                       0x000000010589c29a __DVT_CALLING_CLIENT_BLOCK__ + 7
	6   DVTFoundation                       0x000000010589debc __DVTDispatchAsync_block_invoke + 1191
	7   libdispatch.dylib                   0x00007fff73c476c4 _dispatch_call_block_and_release + 12
	8   libdispatch.dylib                   0x00007fff73c48658 _dispatch_client_callout + 8
	9   libdispatch.dylib                   0x00007fff73c4dc44 _dispatch_lane_serial_drain + 597
	10  libdispatch.dylib                   0x00007fff73c4e5d6 _dispatch_lane_invoke + 363
	11  libdispatch.dylib                   0x00007fff73c57c09 _dispatch_workloop_worker_thread + 596
	12  libsystem_pthread.dylib             0x00007fff73ea2a3d _pthread_wqthread + 290
	13  libsystem_pthread.dylib             0x00007fff73ea1b77 start_wqthread + 15
    );
}
--

System Information

macOS Version 10.15.7 (Build 19H15)
Xcode 12.1 (17222)

How do I get the appmetrica_device_id via the SDK?

You can get the appmetrica_device_id by using the requestStartupParams() method. Make sure to request the DeviceIdHashKey.

Tracking

How does tracking pre-installs differ from tracking installs of various app builds?
  • App versions are updated, and when users update them in the standard way (from the store), you won't be able to use the build name to differentiate a pre-installed app from a regular one. Even if you build the app with a separate package name, it won't differ from the regular one after it is updated.
  • You can use pre-install tracking to link a user to a traffic source (pre-install) and segment reports. This is also helpful when working with multiple vendors: you just need to create multiple trackers and use different tracking IDs when initializing the AppMetrica library.
  • Since the installation is linked to a single traffic source, you won't have to pay the advertising partner if there is a coincidental match during attribution (for example, using Probabilistic Matching).

How do I create a remarketing campaign in AppMetrica?

To create a remarketing campaign:

  1. Make sure you have AppMetrica SDK version 3.1.0 or higher.
  2. Add deeplink support to your app.
  3. Add tracking app openings via deeplinks for Android.
  4. Create a tracker for a remarketing campaign.
  1. Make sure that you have the AppMetrica SDK version 3.1.2 or higher.
  2. Add Universal Links support to your app.
  3. Add tracking app openings via deeplinks for iOS.
  4. Create a tracker for a remarketing campaign.

For more information about attribution, see Attributing remarketing campaigns.

Does AppMetrica use UTM tags?

AppMetrica allows you to use UTM tags in the tracking URL, destination URL, and deeplink. You can add the UTM tag to the created link as a parameter: after the question mark in the key-value format. For more information, see Parameters of the tracking URL.

It is not necessary to save a tracking URL (destination URL or deeplink) with UTM tags when creating a tracker. Add tags before placing the ad. This way, you can use the same link with different UTM tags.

AppMetrica shows UTM tags as tracker parameters in reports. They are also available for grouping.

What format is required for the click_id parameter when sending it to the tracker?

The click_id parameter can contain any string.

How can I create a tracking link for other installation sources?

To create a tracking link, you can create an advertising partner in the AppMetrica web interface. Then when creating a tracker, you can set any parameters you need in the tracking link. More information about custom parameters.

Why was my tracker archived?

Trackers that haven't reported any installs in the 12 months are automatically archived. The gathered tracker statistics will still be reflected in the reports.

You can restore an archived tracker:

  1. Navigate to the tracker list.
  2. Enable the Show archived option.
  3. Click Restore on the tracker you want to unarchive.

Clicking the tracking link on a mobile device results in a security certificate error. How do I fix this?

Set the correct date and time on the device.

Why do I get a 404 error when clicking the tracking link on my PC?

Smartlink settings allow you to specify different links for various device types. You might see a 404 error on your PC if no link for desktop devices is set in the tracker. You can specify the URL in Fallback. Learn more.

Why does the AppStore open when clicking on the tracking link on iOS?

For iOS, instead of the usual tracking link, you need to use Universal link.

Reports

Why do I see more installs in the App Store and Google Play than in the AppMetrica interface?

Google Play and the App Store count installs after the app is downloaded to the smartphone, while AppMetrica counts installs after the app is opened (the first initialization of the AppMetrica SDK).

Why don't new installs show up in statistics?

Check the Events and Engagement reports to see if AppMetrica receives information about events and sessions:

  • If there are no installs shown, but there are events and sessions, check the use of the method or property handleFirstActivationAsUpdate in the extended configuration.

    This option is disabled by default, and new installs show up in reports. If this option is enabled, all new installs will be considered an app update and will not be shown in the reports. See examples for Android and iOS.

  • If there are no installs, events, or sessions, make sure that AppMetrica is tracking session activity correctly.

    If your app supports devices with:

    • Android 4.0 or higher — call the enableActivityAutoTracking method after the library is initialized and before the first screen opens.
    • Android below 4.0 — use the AppMetrica.resumeSession(activity) and AppMetrica.pauseSession(activity) methods.

Learn more

How do I get a complete, ungrouped list of crash logs?

AppMetrica groups crash logs by their stack trace. You don't have to go through each log to find the cause of the error. You can just look at one of the logs from a group.

To get crash statistics for particular types of devices, we recommend using segmentation.

Event counts in Event and User Acquisition reports don't match

The User Acquisition report displays only events that occurred after the app was installed and the installation occurred during the selected report period. The Events report displays events that are not related to the installation date. The user could have installed the app earlier, before the selected period, and complete the event later.

The weekly audience count doesn't add up to the total of daily users

In most cases, the same user launches the app on different days during the week. The result is that this user is counted several times in the daily audience, but only once in the weekly audience.

For example, an app's weekly audience is 100 users. And if you sum up the number of users for each day, you get 110 users. This means that some users have run the app several times over the past week.

How is retention calculated?
  • Date range is December 1 — March 24.
  • Grouping by sources is enabled.
  • The time range is divided into months.
  • Retention metrics is selected.

Example of calculating the percentage of users who returned in the first month after installation:

3532814×100=12.54\frac{353}{2814} × 100 = 12.54

The report displays 17.20%. The resulting numbers differ because the interface displays the number of all returned users grouped by the partner, and the percentage of returns is calculated only for the completed time interval.

For example, it's the 24 of March. For installations made in February, the first month (March) is not over yet. So February is not included into the calculation of the final value of the first month. Therefore, to calculate the percentage of returns in the first month, you need to sum only the values of the zero months, which values are taken into account.

To calculate the percentage of returned users in the first month:

  1. Turn on grouping by installation date.

  2. Enable segmentation by the appropriate installation source.

  3. Divide the total number of returned users in the first month by the total number of installations in July and August:

    147+107747+734×100=17.15\frac{147 + 107}{747 + 734} × 100 = 17.15

    In the report, the value of 17.15 is rounded to a decimal place: 17.20%.

Learn more

Why do the Retention metrics in the User Acquisition and Retention Analysis reports don't match?

In the Retention Analysis report, sessions are counted by calendar days — starting from 00:00.

In the User Acquisition report, sessions are counted based on the time since the app was installed. For example, if a user downloaded and opened the app at 7 p.m. on April 20, then the next day will start at 7 p.m. on April 21.

Accordingly, the indicators are also calculated: in the Retention Analysis report — calendar-based, and in the User Acquisition report — interval-based.

Why does the Organic channel show Google Play as a source but not the App Store?

Google Play enables you to get the source of an organic install using the Play Install Referrer Library. The App Store doesn't offer a similar mechanism.

It takes a long time for device events to show up in the report

AppMetrica SDK does not send an event immediately after it occurred. Events are buffered and sent in batches. To immediately send buffered events after passing important checkpoints of user scenarios, call the sendEventsBuffer() method. This will flush the buffer and send all queued events.

Frequent use of the sendEventsBuffer() method can lead to increased outgoing internet traffic and energy consumption.

API. Data export

Why do the data in the reports and Logs API differ?

Data in reports and Logs API may differ:

User Acquisition report
The Logs API export includes all installs, including reinstalls on the same device. You can identify re-installs by the is_reinstallation field.
The report doesn't count reinstalls. It only counts one installation per device.
Learn more about the User Acquisition report
Remarketing report
To measure re-engagement, the report tracks unique devices that opened the app via deeplinks during the selected period, while the Logs API export records all deeplink openings.
Learn more about the Remarketing report

How do I determine the event's source based on raw data?

The raw event data obtained from the Logs API doesn't include information about the event's source. Events come with the appmetrica_device_id user ID. The reports use this ID to determine that the event is associated with a specific user, whose source is identified at the installation time.

The source information is included in the exported installation data, which also includes appmetrica_device_id.

You can extract installation and event data and then use the VLOOKUP function or any other convenient method to identify the user in each table by appmetrica_device_id. This will allow you to retrieve fields from the settings table that correspond to the event and are linked to the attribution. For example:

  • click_id
  • click_url_parameters
  • publisher_name
  • tracker_name
  • tracking_id

Integration with Yandex Ads SDK

How do I use the advanced configuration features of the AppMetrica SDK?

Initialize AppMetrica SDK manually using the API Key specified in the SettingsMain section.

I'm already using the AppMetrica SDK in my app. Do I need to update my integration?

No, the AppMetrica SDK behavior doesn't depend on the Yandex Mobile Ads SDK.

I'm already using the AppMetrica SDK in my app, and the current number of tracked events is enough for me. How do I disable Yandex Ads SDK automatic events?

Use the method setAppAdAnalyticsReporting for Android and method setAppAdAnalyticsReportingEnabled for iOS in the Yandex Mobile Ads SDK configuration.

How do I initialize the AppMetrica SDK using logic that's different from the Yandex Mobile Ads SDK initialization?

Initialize AppMetrica SDK manually using the API Key specified in the SettingsMain section.

Other

Why does appmetrica_device_id change when the app is reinstalled?

Starting from Android AppMetrica SDK 5.0.0 and higher, appmetrica_device_id changes when the app is reinstalled on a mobile phone. This is due to new Google policies.

appmetrica_device_id change conditions:

  • Current Google policies prohibit the use of IDs that are not reset after the app is reinstalled.
  • The recommended source for generating the device ID is described in the Google documentation. appmetrica_device_id is generated from it.
  • appmetrica_device_id is reset when the app is reinstalled if only one vendor app is installed on the device.
  • appmetrica_device_id is not reset when one of the apps is reinstalled if several vendor apps are installed on the device.
  • Other behavior subjects the app to legal claims from Google.

How do I export IDFA/GAID values?

You can get the IDFA/GAID values:

  • Using a postback. If you have your own server, you can send all the postbacks to it. More information about setting up postbacks.
  • Using the Logs API to download non-aggregated data.

Can I use AppMetrica for an app that isn't yet available on an app store?

Yes, you can. App stores have no effect on AppMetrica analytics. Even if you're distributing your app outside of stores, statistics will still be collected.

Tracking will also work for such apps, including the attribution methods Device Identifier Matching and Probabilistic Matching.

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.

Contact support

An ad campaign aimed at getting users to come back to an app they previously installed. For more information, see Creating a remarketing tracker.