- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
The native Google Analytics SDK for Android and iOS provides a method to enable advertising features, such as demographics and interest reporting. If you implement GA via Tealium's SDK, however, you do not get these features by default. The main reason for this is that not all Tealium users require advertising data, and if it was included by default, additional permissions would be required at install time.
Please note that once this feature is enabled, it may take up to 24 hours for data to appear in GA. If you have too few hits, GA will not show any data, as this could inadvertently identify individual users. Certain thresholds of traffic must be reached before GA will allow you to see the data for privacy reasons.
This guide explains how to retrieve the ADID on Android. Please note this is an external link, and Tealium has no control over its contents:
https://www.
Once you have retrieved the ADID, you can use the following API calls to add the data via the Tealium Android SDK. This will make the data available on each subsequent hit within the app, and the value will persist between app launches:
Tealium SDK v4.x
Tealium.getGlobalCustomData(). edit().putLong("adid", "<your advertising id here>").apply();
Tealium SDK v5.x:
Tealium.getInstance("instancename").getDataSources().getPersistentDataSources().edit().putString("adid", "<your advertising id here>").apply();
NB: Substitute instancename for the actual instance name you are using in the app, and be sure to replace the placeholder text with your actual ADID.
This guide explains how to retrieve the IDFA on iOS. Please note this is an external link, and Tealium has no control over its contents:
http://www.brianjcoleman.com/how-to-use-apples-identifier-for-advertisers-idfa/
Once you have retrieved the IDFA, you can use the following API calls to add the data via the Tealium iOS SDK. This will make the data available on each subsequent hit within the app, and the value will persist between app launches:
Tealium SDK v4.x
[Tealium addGlobalCustomData:@{@"idfa" : @"<your idfa here>" }];
Tealium SDK v5.x
[[Tealium instanceForKey:@"instancename"] addPersistentDataSources: @{@"idfa":@"<your idfa here>"}];
NB: Substitute instancename for the actual instance name you are using in the app, and be sure to replace the placeholder text with your actual IDFA.
Copyright All Rights Reserved © 2008-2021