Passing custom key-values to GAM

The publisher is able to pass custom key-values to the ad server by using the system. This information needs to be provided in the data layer. It can be done by using  ‘atf-targeting’ parameter. There is no limitation of numbers of key-values pairs that can be passed. However, we always suggest removing unused pairs.

Examples:

 pushing single key-value pair

dataLayer.push({'atf-targeting': { 'atf_sdk_custom_key': 'testing'}})
  • pushing 2 or more key values

dataLayer.push({   'atf-targeting': {   'atf_sdk_custom_key': 'testing',   'atf_sdk_custom_key2': 'test2', 'atf_sdk_custom_key3': 'test3' } })
  • pushing more than 1 value for a key

dataLayer.push({   'atf-targeting': {   'atf_sdk_custom_key4': ['test', 'test2']} })
  • example of entire data layer script for <head> section with key-value parameter

Add atf-targeting as attribute (Slot Targeting)

This attribute is optional and build by request. It is possible to define targetings like attributes in the ad slot via atf-targeting-<key>="<value>"