Sending ECommerce events on iOS

In AppMetrica, it is not possible to segment ECommerce events into “test” and “not test”. If you use the main API key for debugging purchases, the test events are included in general statistics. If you need to debug sending ECommerce events, use a reporter to send statistics to an additional API key. For more information about reporters, see Usage examples.
  1. Step 1. Create a test app in AppMetrica
  2. Step 2. Configure sending ECommerce events to the test API key
  3. Step 3. Check the test application's report
  4. Step 4. Configure sending ECommerce to the main API Key

Step 1. Create a test app in AppMetrica

  1. In the AppMetrica interface, click Add application.

  2. Fill in the fields in the form.
  3. Click Create. By clicking the button, you accept the terms of user agreement.
Note. Different versions of the same app can be grouped in a single folder. To do this, create a folder using the button and move the apps to it.

Step 2. Configure sending ECommerce events to the test API key

For different user actions, there are appropriate types of ECommerce events. To create a specific event type, use the appropriate YMMECommerce class method.

The examples below show how to send specific types of events (Objective-C):

Opening a page
// Creating a screen object. 
YMMECommerceScreen *screen = [[YMMECommerceScreen alloc] initWithName:@"ProductCardScreen"
                                                   categoryComponents:@[ @"Акции", @"Красная цена" ]
                                                          searchQuery:@"даниссимо кленовый сироп"
                                                              payload:@{ @"full_screen": @"true" }];