We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

Preventing Competitors from Accessing Content on Form Submission

Concept

You may wish to block competitors from submitting forms in order to access your content such as white papers or data sheets. By inserting some Javascript into your form’s Thank You Code, you can redirect them to a different page that will prevent them from downloading your content.

Instructions

Go to Marketing > Forms

Either edit an existing form or create a new form

During Step 4 (“Completion Actions”) of the Form Wizard, click on the Thank You Code tab

Copy and paste the following code in the text area field:

<script type="text/javascript">
var email = "%%email%%"; //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>

Replace the following content with specified information:

@competitor1.com – the first competitor’s email domain

http://loc1 – if the first competitor submits the form, they will be redirect to this website

@competitor2.com – the second competitor’s email domain

http://loc2 – the redirect location for the second competitor (may be the same as the first redirect)

http://nonCompetitorLocation – where your prospects (non-competitors) will be directed after successful form completion (such a download page for a white paper)

If editing an existing form, press Finish to save. If creating a new form, press Next to go to the confirmation page and then press Finish to save.

Notes

Have more than two competitors you would like to redirect? Simply copy the following line of code after the line with “http://loc2”:

This does not cancel the form submission. Completion actions (such as autoresponse emails) will still take place. This code will redirect competitors to a different success location from prospects. To prevent competitors from downloading or accessing content, it would be best to have it viewable as a success location for prospects and not provide download links in autoresponse emails.

This presumes that competitors will use their work email address while filling out a form on your website. You can block email from ISPs and free email providers by editing your existing email form fields:

When creating your form under Marketing > Forms, select your email prospect field

Edit, and from the Data Format drop down, select Email not from ISPs and free email providers

Press Save form field

This will require anyone filling out this form to provide a business or organization email address. If you would like to have an email prospect field that would allow people to submit personal email address, you can have two different fields (one with the ISPs and free email addresses blocked and one with valid emails). Please check out our Form Fields article for more information.