Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PardotGists/c36faa5eaea2c015630b to your computer and use it in GitHub Desktop.
Save PardotGists/c36faa5eaea2c015630b to your computer and use it in GitHub Desktop.
Preventing Competitors from Accessing Content on Form Submission thank you code
<script type="text/javascript">
var email = "%%email{js}%%"; //set the field name to a local javascript variable
if (email.indexOf("@competitor1.com")!=-1){ //if the string has the competitor name
top.location="http://loc1"; //redirect to a location
} else if (email.indexOf("@competitor2.com")!=-1){
top.location="http://loc2";
} else { //go to the real location
top.location="http://nonCompetitorLocation";
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment