AppMetrica & Apphud
AppMetrica is integrated with Apphud, one of the market leader solutions for in-app subscription and purchases tracking data. Apphud has 99.9% accuracy on app revenue tracking, which ensures that all possible purchase scenarios will be taken into account.
Why is this important:
-
Save Development Resources: No complex integrations with third-party solutions. Easy connection of the Apphud module to AppMetrica can be set up in a few steps.
-
Data Accuracy: Precise subscription tracking data for every purchase scenario, tailored to the specific store or operating system. You always have the most up-to-date insights.
-
Revenue Data Available in other reports: segment your audience by paying capacity and other purchase parameters, discover channels and geos that bring you the most paying users and much more in Revenue, Events, Audience and User Acquisition reports.
Features:
-
App Store & iOS
- Full refunds support, including updates with refund amount.
- Family shared subscriptions support - transactions shared with other users via Family are not counted.
- Correct count of App Store commissions.
- Paid Introductory & Promotional Offers support.
- Subscription Offer Codes Support.
- Purchase Automatic recovery in SDK.
-
Google Play & Android
- Support of subscriptions with multiple base plans.
- Complicated scenarios support, e.g. Free Trial + Paid Discount + Regular Price.
- All offers types support: free trial, discount, fix price & absolute discount.
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.7.0") // AppMetrica SDK Apphud module // You should use the same versions for AppMetrica and Apphud modules implementation("io.appmetrica.analytics:analytics-apphud:7.7.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 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.