Skip to content

Instantly share code, notes, and snippets.

@acoyfellow
Created March 15, 2022 22:54
Show Gist options
  • Save acoyfellow/13909e350f383b4382f80c4f9d88def6 to your computer and use it in GitHub Desktop.
Save acoyfellow/13909e350f383b4382f80c4f9d88def6 to your computer and use it in GitHub Desktop.
Phonesites.com redirect based on "referrerId" URL parameter
<script>
function beforePost(){
var referrerId= params.filter(function(p){
return p.key==='referrerId'
})[0]||{};
// add a new line for each referrer.
if(referrerId.val==='google'){ redirect = "https://google.com" };
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment