Formstack

Track the Referrer When Using a Form on Multiple Websites

On this page you will see how to use one Form with a hidden unique identifier field on multiple websites to track which URL each submission was derived from.  This is useful if you embed a single Form on several different sites/pages and want to track submission traffic for each site or page.

The first step is add a Short Answer field to your Form titled "Referrer".  Be sure to set this field to "Hidden"
 

 

Next, you will want to amend the Javascript embed code to carry the Referrer variable to the form. This variable will be different for each site you want to embed on.  Open up the Form and go to Publish > Quick Start and click the 'COPY' button next to the 'Embed this form on your website:' section. You can then paste that code into a text editor such as Notepad, Notes, Word, Pages, etc. 
 

 

With the code in an editor, you can make the necessary changes.  Here is what our code looks like before the update:

<script type="text/javascript" src="https://test.formstack.com/forms/js.php/untitled_form_264"></script><noscript><a href="https://test.formstack.com/forms/untitled_form_264" title="Online Form">Online Form - my form</a></noscript>
 

And here is what it looks like after the changes:


<script type="text/javascript" src="https://jk.formstack.com/forms/js.php/untitled_form_264?referrer=WEBPAGE_1"></script><noscript><a href="https://jk.formstack.com/forms/untitled_form_264?referrer=WEBPAGE_1" title="Online Form">Online Form - my form</a></noscript>
 

The changes made have been bolded to point out the differences.  The WEBPAGE_1 part is what you will change to know where it is coming from. Examples: "insurance.com" "carquote.com" and so on.


Once this setup is complete and submissions start coming in from your various sites and pages, you will be able to see where the submission came from right in your submitted data.