First of all here is a summarization of what I want to do:
The Google Analytics Tag has the option "Allow Advertising Features", either set to "On" or "Off".
Therefore a DoubleClick Request will be there or not.
And I want to controll this behavior by setting a data layer variable to a current tealium consent status an mapping it to "config.allow_ad_personalization_signals" or "allow_ad_personalization_signals".
How I do it:
I set up a Set Data Value Extension to set a data layer variable to the following js 'utag.gdpr.getSelectedCategories().includes("display_ads")' (before loadrules).
My first question is: Do I have to map this variable to "config.allow_ad_personalization_signals" like tealium is suggesting inside the mapping select destination area, or should I map it to "allow_ad_personalization_signals" like it is stated in this article under "Data Mapping" https://community.tealiumiq.com/t5/Client-Side-Tags/Google-Analytics-gtag-js-Tag-Setup-Guide/ta-p/30...
Furthermore: Do I have to set it to an actual boolean or to a string which includes a boolean?
And my last question is: When I simply turn "Allow Advertising Features" to "On" and ignore it in the mapping, why is there not always a doubleclick request, but only sometimes?
Thanks for your help!
Hello @xXnightfighter ,
The Allow Advertising Features mapping in Google Analytics can be found under the standard tab in the data mappings window. Here is a screenshot of the mapping:
The value that is mapped in here should be a boolean. The function that you mentioned here will return a boolean value:
All you would need to do in the set data values extension is change the input from text to JS Code then add the function call. Also, make sure you set the variable to the same variable that you have mapped in the tag. Here is a screenshot of that:
3 weeks ago - last edited 3 weeks ago
Thanks for confirming this setup. Do you also have an answer to the following two questions?
1. What is the difference between mapping a variable to "config.allow_ad_personalization_signals" or to "allow_ad_personalization_signals", without beeing part of the config object?
2. If Allow Ad Personalization Signals is set to true why can't I see the doubleclick request all the time? This question is not only concerning Tealium, but tracking with Google Analytics. Still I would be happy about an answer ^^