Created
May 4, 2023 07:58
-
-
Save egibney/372526e9fc39e7192b8fa230b5e7b9eb to your computer and use it in GitHub Desktop.
This file contains 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(){ | |
let referral_url = new URL(window.location.href); | |
if (referral_url.searchParams.has('gclid') && referral_url.searchParams.has('via')) { | |
setTimeout(function(){ | |
Cookies.remove('rewardful.referral', { path: '/', domain: window.location.hostname }) | |
console.log(Cookies.get('rewardful.referral')) | |
console.log("Deleted referral cookie as visit came from Google Ads (forbidden by Terms of Service)") | |
}, 2000) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment