Download Tracking:
Learn how to implement download tracking when you advertise your iPhone app across our network.
Download tracking is a free feature AdMob offers to iPhone app advertisers that enables you to accurately track the results from your iPhone advertising spend to help you optimize the performance of your campaign. You can track the number of downloads, cost per download and conversion rate for your iPhone app advertising. Even if your app has not been accepted to the App Store, you can still implement download tracking.
Here’s how it works:
- A user clicks on an AdMob ad.
- The user visits the App Store and installs the app.
- The new user is reported to AdMob when the app launches, either by the app through app or SDK integration, or by the developer using the download API.
- AdMob calculates the cost per download and other download tracking metrics and starts making the results available online after one business day.
- You can view the results by clicking the Tools tab, selecting iPhone Download Tracking, and optionally selecting a date range for the data you want to view (the default is the last 7 days).
- Click the app name to view statistics by ad name and to export the data to a CSV file.
Note: Download information may begin to appear in under 24 hours; however, final download data may take up to three business days to appear in your reports. If you successfully set up download tracking, you see "Running" listed below the ad AdMob is tracking conversions for.
Your download information is confidential. We never share your data with third parties, nor do we record or track any personally-identifiable information. To read AdMob's privacy policy, see Privacy Policy.
There are three ways to configure download tracking:
- App Integration (recommended and preferred)
We encourage all AdMob advertisers to use the app integration option to configure download tracking.
To install download tracking using app integration:
- Add this line to your app delegate's applicationDidFinishLaunching: method:
[self performSelectorInBackground:@selector(reportAppOpenToAdMob) withObject:nil];
- Add this method to your app delegate, replacing the string with your app's Itunes ID (provided by Apple):
(void)reportAppOpenToAdMob {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // we're in a new thread here, so we need our own autorelease pool
// Have we already reported an app open?
NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *appOpenPath = [documentsDirectory stringByAppendingPathComponent:@"admob_app_open"];
NSFileManager *fileManager = [NSFileManager defaultManager];
if(![fileManager fileExistsAtPath:appOpenPath]) {
// Not yet reported -- report now
NSString *appOpenEndpoint =[NSString stringWithFormat:@"http://a.admob.com/f0?isu=%@&app_id=%@",
[[UIDevice currentDevice] uniqueIdentifier], @""];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:appOpenEndpoint]];
NSURLResponse *response;
NSError *error;
NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
if((!error) && ([(NSHTTPURLResponse *)response statusCode] == 200) && ([responseData length] > 0)) {
[fileManager createFileAtPath:appOpenPath contents:nil attributes:nil]; // successful report, mark it as such
}
}
[pool release];
}
- After you install the code snippet, you must trace the call from your application launch to ensure that AdMob is being pinged with the correct data and that the pings are formatted properly. Detailed instructions for doing this are posted at:
http://developer.admob.com/wiki/AppStoreDownloads#Wiresharking_your_iPho....
Pings should be in the following format:
http://a.admob.com/f0?isu=<UDID>&app_id=<APPLE_ITUNES_ID>
- If your app has not yet been accepted by the App Store and you do not have an Apple iTunes ID, you can still use download tracking. In this case, change this line of the app snippet from:
[NSString stringWithFormat:@"http://a.admob.com/f0?isu=%@&app_id=%@",
[[UIDevice currentDevice] uniqueIdentifier], @""];
to:
[NSString stringWithFormat:@"http://a.admob.com/f0?isu=%@&site_id=%@",
[[UIDevice currentDevice] uniqueIdentifier], @"< ADMOB SITE ID >"];
Note: Use your AdMob Site ID in place of the iTunes ID.
- Download API (for advanced users)
If you choose not to add AdMob code to your app, you must use the download API. Please note that this option is for advanced users, and we can only provide limited support for it. This option requires you to collect device identifier (ISU) information on the server side.
To install download tracking using the download API:
- To use this option, you must ping our endpoint with the UDIDs you've collected from your app users. To ping our endpoint (http://a.admob.com/) post the data to our API using this format:
- http://a.admob.com/f0?isu=<UDID>&app_id=<APPLE_ITUNES_ID>
- Replace <UDID> with the 40-character unique iPhone string UIDevice UniqueIdentifier property.
- Replace <APPLE_ITUNES_ID> with your app's iTunes id.
- If the iTunes app ID is not available because your app has not been accepted to the iTunes Store, you can replace app_id = <APPLE_ITUNES_ID> with site_id =<AdMob_Site_ID>. In this case, the POST will be:
http://a.admob.com/f0?isu=<UDID>&site_id=<AdMob_Site_ID>
Note: You can post the data to our API directly; however, we recommend that you post the data as often as possible. Don't worry about sending us duplicate UDID's, as we make sure to discount duplicates and not over-report your downloads.
- To ensure your conversions are being tracked properly, perform the following steps.
- Run your campaign for a few minutes until clicks are generated.
- Pause the campaign.
- Ping our API with the ISU data you collect.
- Wait eight hours to see if the tracking status changes from Pending to Running. If after eight hours the status is still Pending, check that you are posting the correct data to AdMob’s endpoint: http://a.admob.com.
You can make API requests daily; however, we recommend that you ping the data to AdMob as often as possible. To confirm that your API request is formatted correctly, the API response returns this confirmation for valid requests: [true]. If the request is invalid, no confirmation is returned.
Be sure the ISU provided to AdMob via the conversion API matches the UIDevice uniqueIdentifier property, as documented here:
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/...
- Publish AdMob Ads (for publishers)
If you are publishing AdMob ads in your apps, you are automatically using this option.
Note: There are limitations to the data this option collects - AdMob is unable to track all conversions if you do not show an ad to each user. For example, if you only show an ad to one in ten users, AdMob can only report 10% of your total downloads. We advise you to implement app integration to ensure we track 100% of your conversions. Learn more on our developer wiki: http://developer.admob.com/wiki/AppStoreDownloads#Option_3:_Publish_AdMo...
Keep in mind that for us to automatically track downloads, you must integrate our SDK into your app and push it out to Apple prior to running ads. After your app is successfully sending us ad requests, you see it listed as Running in the publisher section of your account. If you add your app to the publisher section of your account, but the download tracking status of your ads is still listed as Pending, your conversions are not being tracked.
There are three different states of download tracking post-installation:
- Not Configured - A conversion tracking option has not been chosen.
- Pending - The tracking option is configured and will change states to running after AdMob registers the first conversion. Please note that if you have apps that are listed as inactive in your account, conversion tracking does not function. You must integrate our SDK in your app or add code using option 1 above in order for us to successfully track conversions.
- Running - Conversions are successfully being tracked and reported.
For more help on download tracking, please visit our developer wiki: http://developer.admob.com/wiki/AppStoreDownloads
Related Topics:
Edit Your Campaign, Ad Group or Ad
Copy Your Campaign, Ad Group or Ad
Pause Your Campaign, Ad Group or Ad
Run Your Campaign, Ad Group or Ad