Skip to content

Instantly share code, notes, and snippets.

@codeorelse
Created March 8, 2018 17:16
Show Gist options
  • Save codeorelse/29bf4a843fa51ebbe25813f6805a8a6b to your computer and use it in GitHub Desktop.
Save codeorelse/29bf4a843fa51ebbe25813f6805a8a6b to your computer and use it in GitHub Desktop.
AppNexus VIA Tag 2.0
window.addEventListener("message",function(e){if(e.data&&"LEMONPI_CREATIVE_RENDERED"===e.data.name)var a=setInterval(function(){"undefined"!=typeof mraid&&(clearInterval(a),e.source.postMessage({type:"EXECUTE_KOSI_METHOD",method:"trackInteraction",args:["other","via","st:${SUPPLY_TYPE}_mraid:"+mraid.getVersion()+"_app:${EXT_APP_ID}"]},"*"))},100)});
@codeorelse
Copy link
Author

  • Should be added as a third party tag of type Raw JS.
  • Only works with creatives that have Kosi enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment