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); | |
}; |
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
<form method="post" | |
action="https://...some/form/action" | |
name="signup" | |
id="sadf22222" | |
accept-charset="UTF-8" | |
onsubmit="return verifyForm();" > | |
<input type="hidden" | |
class="ym_tag_with_click" | |
name="redirect" | |
value="http://example.com/trackme/yay/"> |
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
// this could be minified by their build system | |
// | |
(function(window,document){ | |
var tokenizer = function(key, searchString) { | |
var result = new RegExp(key + "=([^&]*)", "i").exec(searchString || window.location.search); | |
return result && unescape(result[1]) || ""; | |
}; | |
var clickId = tokenizer('click_id'); | |
if(!clickId || clickId.length < 1){ | |
return; |