AppMetrica and Apphud
AppMetrica is integrated with Apphud, one of the leading solutions for tracking purchases and subscriptions in mobile apps. Apphud delivers 99.9% accuracy in tracking app revenue, which ensures that all possible purchase scenarios are taken into account.
Advantages:
- Save your development resources. No integrations with third-party solutions are needed, and you can set up the Apphud module in a few steps.
- Keep your data accurate and up to date. The service tracks subscriptions for every purchase scenario and can be adapted to specific app stores and operating systems.
- Revenue data is available in your reports. You can segment your audience by income or other purchase parameters and learn which channels and regions generate the most paying users. View reports on revenue, events, audience, and user acquisition.
Features:
-
App Store & iOS
- Support for full refunds, including updates on changes to the refund amount.
- Support for family shared subscriptions. Family sharing transactions shared with other users are ignored.
- Correct calculation of the App Store commissions.
- Support for paid trials and promotional offers.
- Support for subscription offer codes.
- Automatic purchase restoring through the SDK.
-
Google Play & Android
- Support for subscriptions with multiple basic plans.
- Support for complex scenarios, for example: a free trial + paid discount + regular price.
- Support for all offer types: free trials, discounts, fixed prices, and absolute discounts.
How to enable Apphud
Tracking via Apphud is a paid feature available with the Custom and Pro plans. This option comes with a free MTR limit of $10,000
.
- Tracking via Apphud may be unavailable in some regions.
- Apphud only works with Google Play and the App Store. It doesn't collect data from other app stores, such as Huawei AppGallery.
-
Activate Apphud under Organization → Payment and plan.
- If you are on the Free plan, upgrade to the Custom or Pro plan and complete the required information. Once upgraded, the option and the free limit are activated automatically.
- If you already have the Custom or Pro plan, the option and the free limit are activated automatically.
-
Update the AppMetrica SDK. AppMetrica supports tracking via Apphud starting from version 7.6.0 for Android and 5.9.0 for iOS.
-
Disable automatic collection of purchase and subscription data from Google Play or the App Store in the AppMetrica SDK.
AndroidiOSKotlinJavaval config = AppMetricaConfig.newConfigBuilder(API_KEY) .withRevenueAutoTrackingEnabled(false) .build() AppMetrica.activate(context, config)
AppMetricaConfig config = AppMetricaConfig.newConfigBuilder(API_KEY) .withRevenueAutoTrackingEnabled(false) .build(); AppMetrica.activate(context, config);
SwiftObjective-Clet configuration = AppMetricaConfiguration(apiKey: "API_KEY")! configuration.revenueAutoTrackingEnabled = false AppMetrica.activate(with: configuration)
AMAAppMetricaConfiguration *configuration = [[AMAAppMetricaConfiguration alloc] initWithAPIKey:@"API_KEY"]; configuration.revenueAutoTrackingEnabled = NO; [AMAAppMetrica activateWithConfiguration:configuration];
-
Disable manual collection of purchase data (if configured) from Google Play or the App Store.
Try searching for
AppMetrica#reportRevenue(Revenue)
calls in your code and removing them. For instructions on how to enable manual collection, see the relevant sections for Android and iOS. -
If you're using the POST API to send in-app revenue data for Google Play and App Store purchases and subscriptions, disable this option.
Note
We recommend disabling all data collection (both manual and automatic) to prevent duplicate data in reports.
-
Integrate the Apphud module into your app code.
AndroidiOSThe version of your Apphud module must match the version of your AppMetrica SDK.
dependencies { // AppMetrica SDK implementation("io.appmetrica.analytics:7.9.0") // AppMetrica SDK Apphud module // You should use the same versions for AppMetrica and Apphud modules implementation("io.appmetrica.analytics:analytics-apphud:7.9.0") }
CocoapodsSPMpod 'AppMetricaApphudAdapter', '~> 1.0.0'
dependencies: [ .package( url: "https://github.com/appmetrica/appmetrica-sdk-apphud-adapter-ios", from: "1.0.0" ) ]
-
Enter your app details under Settings → Subscriptions tracking (Apphud) in the AppMetrica interface.
Android appiOS app-
Google Play package name.
-
JSON service account.
To track subscription status updates, create and upload a service account JSON file to AppMetica. For information on how to create a JSON file, see the Apphud documentation.
-
Real-time Google developer notifications.
Once you upload the JSON file, a string will appear in the interface. Copy this string to Google Play Console → Your App → Monetization Setup. For more information, see the Google documentation.
-
Google Play Reduced Service Fee.
If you're registered for the Google Play Reduced Service Fee program, specify your enrollment dates.
-
Bundle ID.
-
App Store Apple ID.
You can find it under App Store Connect → Apps → App Information.
-
App Store Shared Secret.
How to get an App Store Shared Secret
- Open App Store Connect, go to Apps, and select your app.
- Go to Subscriptions from the Features menu on the left.
- On the page, find the App-Specific Shared Secret section and click Manage.
- Create and copy a Shared Secret.
- In the AppMetrica interface, go to Settings → Subscriptions tracking (Apphud) → iOS application.
- Insert the Shared Secret for the app in the App Store Shared Secret field.
-
Apple Small Business Program.
If you're registered for the Apple Small Business Program, specify your enrollment dates.
-
App Store server notifications.
- App Store Server API (StoreKit 2). In-app purchase key.
A private key from App Store Connect that you need to upload to AppMetrica. For information on how to generate an in-app purchase key, see the Apphud documentation.
- App Store Server API (StoreKit 2). In-app purchase key.
-
URL for App Store Server Notifications V1 or V2.
Once you upload the In-App Purchase Key, a string will appear in the interface. This is a URL for configuring App Store Server Notifications.
How to set up App Store server notifications
- Copy the URL for App Store server notifications.
- Open App Store Connect, go to Apps, and select your app.
- Go to App Information from the General menu on the left.
- At the bottom of the page that opens, find the App Store Server Notifications section and click Edit next to Production Server URL.
- In the Production Server URL field, enter the URL from AppMetrica.
- In the form below, select Version 2 Notifications and click Save.
-
Issuer ID.
Issuer ID from App Store Connect. You can find it under App Store Connect → Users and Access → Keys → App Store Connect API.
-
How to get access in the Apphud dashboard
In the AppMetrica integration, when a user uploads certificates for their app, an Apphud dashboard is created. It is registered for the company owner's email address. After that, the user gets access to their app and all the Apphud reports included in the plan they selected.
How to grant access for other employees
In the Apphud dashboard, you can set up access to the app for other employees of your company.
If the user who uploaded the certificates isn't the app owner, they can ask the app owner to undergo the access recovery procedure and then go to the Apphud dashboard and grant this user access to the app.
How to disable Apphud
-
In the AppMetrica interface, go to Organization → Payment and plan.
-
In the box with your pricing plan, click Settings.
-
Find the Tracking in-app purchases and Apphud subscriptions option in the list and select Disabled next to it.
-
Click Save.
-
To disable the Apphud module, remove its dependencies from your app's code.
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.