Created
February 1, 2017 10:07
-
-
Save nicohvi/a3ec834a09d462c5b967ea3963c1fedb 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
| $(document).ready(function() { | |
| // nå er alt lastet | |
| function GetUrlValue(VarSearch){ | |
| var SearchString = window.location.search.substring(1); | |
| var VariableArray = SearchString.split('&'); | |
| for(var i = 0; i < VariableArray.length; i++){ | |
| var KeyValuePair = VariableArray[i].split('='); | |
| if(KeyValuePair[0] == VarSearch){ | |
| return KeyValuePair[1]; | |
| } | |
| } | |
| } | |
| var asid = GetUrlValue('aspid'); | |
| var campaign = GetUrlValue('utm_campaign'); | |
| if(asid != undefined) { | |
| $("a").attr('href', function(i, h) { | |
| return h + (h.indexOf('?') != -1 ? "&aspid=" + asid : "?aspid=" + asid); | |
| }); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment