E-commerce
When making in-app purchases, users perform various actions: E-commerce events. For example:
- Opening a page.
- Viewing a product profile and page.
- Adding and removing an item to/from the cart.
- Starting and completing a purchase.
With AppMetrica, you can collect information about these actions and track their statistics in the E-commerce report.
After you set up sending E-commerce events, you'll be able to:
- Analyze your sales funnel from product views to purchases.
- Evaluate the effectiveness of different product categories.
- Identify popular products and app screens.
- Analyze the use of promo codes.
- Evaluate the conversion rate at each funnel stage.
- Compare the effectiveness of various acquisition channels.
- Analyze the geography of purchases.
E-commerce events aren't included in paid limits. Sending these events doesn't affect your plan cost.
How E-commerce is calculated
Data is transmitted from the SDK for each user action performed when making a purchase (E-commerce event).
All E-commerce events in AppMetrica are linked to users, and the E-commerce metrics are calculated based on this data.
Monetary metrics, including virtual money:
| Metric | Description |
|---|---|
| Revenue | Total revenue from E-commerce events for the reporting period. |
| Average order value (AOV) | The ratio of the total revenue to the number of purchases for the reporting period. |
| Average revenue per user (ARPU) | The ratio of the revenue from E-commerce events for the reporting period to the number of app users for the same period. |
| Average revenue per paying user (ARPPU) | The ratio of the revenue from E-commerce events for the reporting period to the number of paying users for the same period. |
| Average product price | The ratio of the total cost of products to the number of purchased products for the reporting period. |
| Basic cost of purchased items | The total basic cost of all purchased products for the reporting period. |
| Actual cost of purchased items | The total actual cost of all purchased products for the reporting period. |
| Average basic product price | The ratio of the total basic cost of products to the number of purchased products for the reporting period. |
| Average actual product price | The ratio of the total actual cost of products to the number of purchased products for the reporting period. |
User action analysis:
| Metric | Description |
|---|---|
| Views of product info | The number of views of a product card for the reporting period. |
| Users who viewed the product info | The number of unique users who viewed a product card for the reporting period. |
| Product page views | The number of product page views for the reporting period. |
| Users who viewed a product page | The number of unique users who viewed a product page for the reporting period. |
| Number of additions to the cart | The number of events of adding items to the shopping cart for the reporting period. |
| Items added to the cart | The total number of products added to the shopping cart for the reporting period. |
| Users who added an item to the cart | The number of unique users who added items to the shopping cart for the reporting period. |
| Items removed from the cart | The total number of products removed from the shopping cart for the reporting period. |
| Users who removed an item from the cart | The number of unique users who removed items from the shopping cart for the reporting period. |
| Items purchased | The total number of products purchased for the reporting period. |
| Users who purchased an item | The number of unique users who made a purchase for the reporting period. |
| Items purchased per user | The ratio of the number of purchased products to the number of users for the reporting period. |
| E‑commerce purchases | The number of purchases made for the reporting period. |
| Purchases per user | The ratio of the number of purchases to the number of users for the reporting period. |
| Starting a purchase | The number of events of starting a purchase for the reporting period. |
| Users who started making a purchase | The number of unique users who started making a purchase for the reporting period. |
| Pageviews | The number of pageviews for the reporting period. |
| Users who viewed a page | The number of unique users who viewed pages for the reporting period. |
Set up sending E-commerce events
There are two ways to set up sending E-commerce events: via the SDK (the main method) or the Post API.
Set up sending E-commerce events via the SDK
Step 1. Activate the SDK
Make sure that the AppMetrica SDK is activated in your app:
Step 2. Set up sending E-commerce events via the SDK
Select a platform and integration method and set up the appropriate SDK methods:
Debugging
In AppMetrica, it's not possible to segment events into test and non-test ones. If you use the main API key for debugging the collection of data on advertising monetization, the test events are included in general statistics. For this reason, to debug, use a reporter to send data to an additional API key.
Learn more about reporters
-
Android
-
iOS
-
Flutter
-
React Native
-
Unity
Set up sending E-commerce events via the Post API
Here are the cases when using the Post API might be a good idea:
- Import of historical data — upload events for a period when the SDK wasn't yet installed (over the past 14 days maximum).
- Server validation — transmit data from your backend after additional processing or validation.
- Data aggregation — group data from multiple sources before sending it to AppMetrica.
- Offline scenarios — send data collected while a device was offline.
- Integration with third-party systems — get data from ad networks via their APIs and send it to AppMetrica.
- Advanced logic — apply business logic on the server before sending analytics.
Take into account the specific features and limitations of the Post API.
Step 1. Get a Post API key
Go to Settings → Main and get the Post API key for request authorization.
Debugging
To make sure that test events aren't included in general statistics while debugging data collection, use different Post API keys for the testing and production environments.
Step 2. Prepare the data to send
Review the documentation on uploading E-commerce events via the Post API: Uploading E-commerce events.
Collect the necessary parameters for an E-commerce event.
Step 3. Send an HTTP request
The Post API supports two data transfer methods:
-
Sending data in the request body (CSV format). Works well for bulk data uploading.
Use the following endpoint:
/logs/v1/import/ecommerce.csv.Pass the data in the request body in CSV format.
-
Sending data in request parameters. Works well for standalone events.
Use the following endpoint:
/logs/v1/import/ecommerce.Pass the data as URL parameters.
Step 4. Handle the response
The API returns the following response codes:
200: Data uploaded successfully.403: Authorization error.400: Missing required parameters.
Check data in reports
After you set up sending E-commerce events via the SDK or using the Post API, make sure that the event data flows into the system and the number of events matches the number of ad views.
Metrics are available in the E-commerce report. You can evaluate:
- The number of product profile and page views.
- The number of additions to the cart.
- The number of purchases.
- The amount of revenue and discounted sales.
- Geography of purchases using a dimension with data grouped by city.
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.