Skip to content

Instantly share code, notes, and snippets.

@Risyandi
Last active November 12, 2018 10:26
Show Gist options
  • Save Risyandi/cbec0c0b1c64afd64c8f to your computer and use it in GitHub Desktop.
Save Risyandi/cbec0c0b1c64afd64c8f to your computer and use it in GitHub Desktop.
This is a sample tags script from criteo, the script should be implement on DFP
/* This script adding after tags DFP
* googletag.defineSlot('/95250053/LIPUTAN6_LB_HEALTH', [[728, 90], [970, 90]], 'div-gpt-ad-1435336898160-0').addService(googletag.pubads());
*/
var crtg_split = (crtg_content || '').split(';');
var pubads = googletag.pubads();
for (var i=1;i<crtg_split.length;i++){
pubads.setTargeting("" + (crtg_split[i-1].split('='))[0] + "", "" + (crtg_split[i-1].split('='))[1] + "");
}
/* This script adding between script
* googletag.pubads().enableSingleRequest();
*/
googletag.pubads().setTargeting('72890_Crt', ['1']);
/*
* googletag.enableServices();
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment