Conversion Tracking

Overview

The MoPub SDK offers a conversion tracking API that you can use to properly measure the effectiveness of cross-promotions and direct-sold advertisements.

GDPR disclaimer

MoPub is committed to ensuring that our services comply with the European Union’s new General Data Protection Regulation (GDPR). As such, Conversion Tracking only take place if explicit GDPR consent has been obtained from the user prior to the both the action event (impression/click) and conversion event.

Session tracking will still be measured for all users regardless of the state of GDPR consent.

Basic implementation

Conversion tracking can be implemented by adding a single line to your application delegate, in -application:didFinishLaunchingWithOptions:.

You will need to obtain your iTunes application ID. The easiest way to do this is to use the iTunes Link Maker tool to generate a URL, and extract the number that immediately follows the text “id”. As an example:

  • The “HeadingOut” application has an iTunes URL http://itunes.apple.com/sn/app/headingout/id399903812?mt=8, so its application ID is 399903812.

Next, import the MPAdConversionTracker.h file in your application delegate, and place the following line in -application:didFinishLaunchingWithOptions:

[[MPAdConversionTracker sharedConversionTracker]
    reportApplicationOpenForApplicationID:@"<ITUNES_APPLICATION_ID>"];

replacing “" with your own.

Advanced implementation

If your application already reports installs to your own server, you can choose to use our server-side conversion tracking API instead of bundling this logic in your app.

Whenever you want to us to track conversions for you, simply ping the URL: http://ads.mopub.com/m/open?v=5&udid=ifa:<ID_FOR_ADVERTISING>&id=<APP_STORE_ID>

An example: To report a conversion for the Slide To Unlock application (http://itunes.apple.com/us/app/id359315994?mt=8) with raw IDFA 144C0177-9756-4FB2-8A4B-678BF5BE6220, the API call would look like: http://ads.mopub.com/m/open?v=5&id=359315994&udid=ifa:144C0177-9756-4FB2-8A4B-678BF5BE6220

To maintain the accuracy of conversion data on our servers, please limit your conversion calls to one per unique IFA.

Session tracking

The MoPub SDK will automatically record a “session” event whenever your application enters the foreground. If you would like to deactivate this, you can do so by setting the SESSION_TRACKING_ENABLED flag to 0 in MPConstants.h.

Last updated June 14, 2018

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2018 MoPub Inc.