Created
April 9, 2015 10:34
-
-
Save kpnemo/c56e3777ccac84e5afcc 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
| function getParameterByName(name) { | |
| var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); | |
| return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
| } | |
| function terminateRendering() { | |
| document.write(''); | |
| try { | |
| window.stop() | |
| } catch (e) { | |
| try { | |
| document.execCommand('Stop') | |
| } catch (e) { | |
| } | |
| } | |
| } | |
| var td_campaign_id = 'cVGsuPwvxjoFkfk21'; | |
| var direct_campaign_url = '//servedby.trackingdesk.com/' + td_campaign_id; | |
| if(document.referrer) { | |
| direct_campaign_url += '?Ref=' + document.referrer; | |
| } | |
| var event_id = getParameterByName('event_id'); | |
| if(!event_id) | |
| { | |
| terminateRendering(); | |
| document.location = direct_campaign_url; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment