Tracking Conversions

Conversion tracking is actually just an extension of event tracking. A Perfect Audience "in-app conversion" is just a tracked event with extra metadata attached, associated with a conversion goal in your Perfect Audience dashboard.

When setting up tracking for an event that you want to count as a conversion, you may want to pass in extra meta data with the event. You can do so using the method below.

[Marin trackEvent:@"Purchase"
        withOrderId:@"12345"
            revenue:@"19.99"
 conversionMetadata:nil
           metadata:nil];

The orderId should be an identifier unique to your system. This can be used for de-duplication.

Revenue is a monetary value associated with the conversion. Currently the revenue value is currency agnostic.

Creating an In-app Conversion Goal in Perfect Audience

Once the event you want to count as a conversion has appeared in your account, you can create a conversion goal attached to it.

Navigate to the Create Conversion page on your account.

283

From the Create Conversion page, select the event you want to associate to a conversion. Fill out the rest of the form and then click Create Conversion Goal.

642

After the conversion creation all subsequent events that match the Purchase event will also be associated with the newly created conversion.

There are several additional fields supported by Marin that can be passed in the conversionMetaData param.

NSDictionary *conversionMetadata = @{
@"currency_code": @"",
@"order_id": @"",
@"order_type": @"",
@"product_id": @[],
@"product_category": @[],
@"product_quantity": @[],
@"product_unit_price": @[],
@"marin_convType": @[],
@"marin_order_id": @[]
};
[Marin trackEvent:@"Purchase"
withOrderId:@"12345"
revenue:@"12.99"
conversionMetadata:conversionMetadata
metadata:nil];