Skip to content

Instantly share code, notes, and snippets.

@crova
Created July 9, 2018 17:44
Show Gist options
  • Save crova/e126f10c016bddbcf4486011e96c4d4f to your computer and use it in GitHub Desktop.
Save crova/e126f10c016bddbcf4486011e96c4d4f to your computer and use it in GitHub Desktop.
How can one achieve the same thing using Cookies to pass along the "aff_sub"?
<script>
$(document).ready(function () {
$(window).load(function () {
if (getURLParameter("aff_sub") != "null") {
var href = $("a[href*='#aff_sub#']").attr("href");
href = href.replace(/#aff_sub#/g,getURLParameter("aff_sub"));
$("a[href*='#aff_sub#']").attr("href",href);
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment