Forked from emaxerrno/shinji.adv.sample.postback.js
Last active
August 29, 2015 13:55
-
-
Save yieldmo/8700796 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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); |
I think there's an '=' missing after the click_id param in both examples; should be:
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
Should line 15 actually be:
?