Skip to content

Instantly share code, notes, and snippets.

@acoyfellow
Created March 15, 2022 23:03
Show Gist options
  • Save acoyfellow/59830cc5f13f5261b9bb2327b183ca65 to your computer and use it in GitHub Desktop.
Save acoyfellow/59830cc5f13f5261b9bb2327b183ca65 to your computer and use it in GitHub Desktop.
Phonesites Custom Redirect
<!-- add this code to a Code block. Style with "style" and "class" attributes -->
<button
onclick="window.location= redirect;"
style=""
class="button-reset pv3 tc ba b--transparent bg-animate pointer w-100 br2">
Click Me
</button>
<!-- add this to a page's Custom Code > Below Body -->
<script>
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