Created
September 25, 2016 16:48
-
-
Save Souvent22/92f219a51dd314a17846c0e78108fb95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Global targeting from Tealium | |
/** | |
* Get our Tealimum items and let's pass those through. | |
*/ | |
if (class_exists('\TI\Tealium\API')) { | |
$api_do = new \TI\Tealium\API(); | |
$udo = $api_do->get_udo(); | |
foreach ($udo as $tealium_key => $tealium_value) { | |
$time_dfp_config['setTargeting'][$tealium_key] = $tealium_value; | |
// Ad ops wants aid and gid seperated ( article and gallery ) | |
if ($tealium_key == 'template_type' ) { | |
if ($tealium_value == 'article') { | |
$time_dfp_config['setTargeting']['aid'] = $tealium_value; | |
} elseif ($tealium_value == 'gallery') { | |
$time_dfp_config['setTargeting']['gid'] = $tealium_value; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment