/
Updating the data layer information
Updating the data layer information
After the data layer values have been configured the publisher can update the values for the whole page. From this moment, all the newly identified ad slots will use the new values. The update can be done by executing the scripts:
To update the content type:
dataLayer.push({'atf-contentType': 'newContentType'});
dataLayer.push({'event': 'atf-contentTypeUpdated'});
To update the channel:
dataLayer.push({'atf-channel': 'newChannel'});
dataLayer.push({'event': 'atf-channelUpdated'});
To update the targeting:
dataLayer.push({'atf-targeting': { 'atf_sdk_custom_key': 'newValue'}});
dataLayer.push({'event': 'atf-targetingUpdated'});
For more details about the data layer values, check “Data layer information” (page 6).
atf-contentType
This parameter is optional. It is used for different content types than the one which is defined in the data layer. The content type has to comply with the rules defined in “Data layer information” (page 6).
Example:
<atf-ad-slot id="my_site_ad_slot_4" atf-format="content" atf-formatSize="1000x250" atf-formatNote="special" atf-contentType="gallery">
</atf-ad-slot>
atf-channel
This parameter is optional. It is used for a different channel than the one that is defined in the data layer.
Example:
<atf-ad-slot id="my_site_ad_slot_4" atf-format="content" atf-formatSize="1000x250" atf-formatNote="special" atf-channel="cars">
</atf-ad-slot>
, multiple selections available,
Related content
Passing custom key-values to GAM
Passing custom key-values to GAM
More like this
Additional parameters in ad slots
Additional parameters in ad slots
More like this
Additional functionalities provided by ATF
Additional functionalities provided by ATF
More like this
In <head> Section
In <head> Section
Read with this
Functions for React Single-Pages
Functions for React Single-Pages
More like this
Overview of the ATF SDK - ATF Manager flow
Overview of the ATF SDK - ATF Manager flow
Read with this