Skip to content

Instantly share code, notes, and snippets.

@emaxerrno
Forked from yieldmo/adv.sample.postback.js
Created February 4, 2014 17:04
Show Gist options
  • Save emaxerrno/8807900 to your computer and use it in GitHub Desktop.
Save emaxerrno/8807900 to your computer and use it in GitHub Desktop.
var addScriptTag = function(url) {
var node = document.createElement('script');
node.type = 'text/javascript';
node.async = true;
node.src = ('https:' === document.location.protocol ? 'https:' : 'http:') + url;
node.id = '' + new Date().getTime();
var topelem = (document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]);
topelem.appendChild(node);
};
// you need to extract {{click_id}} out of the url
// refer to ym_submit_with_click_id.js (https://gist.github.com/yieldmo/8700590)
var clickId = '22222';
addScript('//tkr.yieldmo.com/t_adt/adt?click_id' + clickId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment