- brycelwAsked on July 02, 2012 at 06:48 PM
This is a re-post of a comment on Capture the Page URL Where the Form is Embedded
- jeanettebmzAnswered on July 02, 2012 at 06:49 PM
Can you please provide us with the link where the form is embedded?
- brycelwAnswered on July 02, 2012 at 06:51 PM
its squarespace.com. Im looking for the easiest way to track exactly what URL the submissions are coming from as this same form is embedding on every page of my site.
this is my embed code
- jeanettebmzAnswered on July 02, 2012 at 09:11 PM
Here are the instructions: 1. Insert a hidden box to your form, name it to something like "referrer" or "website". (Please note that your hidden box name (e.g. referrer) will be used later in formulating your URL parameter.)
2. Get your form's script code. In your case it will be :
Note that I have replaced http://form by http://www at the beggining of your form's link
4. Insert a backslash in front of each double quote
4. Append ?referrer= after your form ID (if your hidden box name is referrer) .To make this short, this URL parameter depends on your hidden box name.
document.write("PART 1 GOES HERE" + window.location.href + "PART 2GOES HERE" + "PART 3GOES HERE");
SO THE FINAL CODE WOULD BE :
document.write("<scriptsrc=\"http://form.jotform.com/jsform/21814747300145?referrer=" + window.location.href + "\"></" + "script>");
6. Embed the edited codes onto yourpages.
The URL of the page where the form is submitted will be stored in a hidden field which will be displayed in your form's email alerts and submissions page.
- brycelwAnswered on July 05, 2012 at 03:40 PM
Is this the only way to track URL from a submission? Is Squarespace not compatible with this type of code modification? Would love to get this working somehow someway!
- JotForm SupportidarktechAnswered on July 05, 2012 at 10:43 PM
This may also help. The code is much cleaner and lesser than the first one ;)
Hope this works for you. Update us here if you run into any problems. Thank you.
- brycelwAnswered on July 06, 2012 at 10:28 AM
I originally got this method with the source code working perfectly. The problem is that when the source code is used, it bugs out my Squarespace slideshows for some wierd reason. They looked into it and told me the code was "too advanced" for their platform thats why the slideshows were malfunctioning.
When I use the short embed code my slideshows and form works perfect but then I cannot get the URL tracking to work! Please help! Is there an alternate way to track URL with the short embed code?
- JotForm SupportMike_TAnswered on July 06, 2012 at 06:33 PM
Please try the following code:
document.write("<script src=\"http://form.jotformeu.com/jsform/21876681545363?referrer=" + window.location.href + "\"></" + "script>");
Where my test form ID 21876681545363 should be replaced with your form ID.
Here is the same code on a screenshot:
- JotForm SupportMike_TAnswered on July 06, 2012 at 06:40 PM
You will also need to replace the domain in provided above code example. Your form is on a jotform.us domain, so you should place something like the following form URL: