Append Referring URL to form results

  • Profile Image
    Asked on February 14, 2012 at 12:13 PM

    It would be nice to have a referring website URL included in the form results so that we can see which places we are advertising are actually producing leads. Can you suggest any methods or developers who might be able to assist us in setting this up to work with Jotform?

  • Profile Image
    Answered on February 14, 2012 at 11:31 PM

    Hi there,

    I think this is what you're lookig for:

    Just contact us again if you need further assistance. Thank you so much!

  • Profile Image
    Answered on February 15, 2012 at 01:03 AM

    I think this would send the page url where the form was embedded correct? But if the the visitor clicked a google adword ad then arrived on our homepage... then clicked contact us...then submitted the form the reffering url would be my own homepage and not adwords. correct? 

  • Profile Image
    Answered on February 15, 2012 at 11:17 AM

    Hello there,

    I just review the guide and that's how exactly it works. Sorry if I have provided you wrong information.

    I'm afraid what you're trying to achieved isn't currently possible with JotForm. I don't have any idea to how the google adword works or tracking url's so I can't further help you with this. I think this is a bit impossible, for me.

    Should you have any other questions or concerns, please let us know. Thank you for using JotForm!

  • Profile Image
    Answered on February 15, 2012 at 11:21 AM

    Hi pillarmarketing.    There is a way to measure this, although independent of JotForm. Start at and go from there.

  • Profile Image
    Answered on February 15, 2012 at 11:30 AM


    Thanks for your help. It's greatly appreciated. Have a great day!

  • Profile Image
    Answered on February 15, 2012 at 02:59 PM

    thanks for your attention on this question... I've already got my AdWords hooked up to my analytics... if that is good for tracking conversions and keyword performance... however I still think it would be great if we could include that kind of information right along with the jotform emails. 

    Maybe it could be some sort of JavaScript code that is added to every page of our site and then is passed on to jotform when the visitor arrives on the Web form. 

    Thanks again.

  • Profile Image
    Answered on March 09, 2012 at 08:33 AM


    I found this way of using jquery to set a cookie containing the original referring url... then the form pulls in the cookie data . Can you have a quick look and tell me if this will work with jotform?



  • Profile Image
    Answered on March 09, 2012 at 10:36 AM

    Hello, pillarmarketing.  I'm thinking of a different alternative.  Rather than using a cookie based approach, I'm thinking of doing PHP scripting by using session instead.  This way, it will prevent cookie disabled browsers from having errors with your form.  But first, can you tell us that your site can run PHP scripts?

    If the answer is yes, then make sure that the file extension of your webpage is .php.

    Next, on your landing page, make sure you have this code on top of the file:


    $_SESSION['referrer'] = $_SERVER['HTTP_REFERER'];


    This code will enable all visitors to print the referring URL and store it as a temporary session data.  On your page with the form embedded, you can then add the session data via URL parameters.  Example:  <script type="text/javascript" src="//<?php session_start(); echo "$_SESSION['referrer']; ?>"; ?>"></script>

    It would also be great if you can share with us the URL of the webpage in issue.


  • Profile Image
    Answered on March 09, 2012 at 12:10 PM


    The client is using a static site at the moment so I'd like to get the static option working first. 

    however I do have a WordPress site to test this with right now... I have added the code snippet to my functions.php file in my WordPress theme...  (  is that the right place to put it ?  )

    Now when I view the source of the page that has the form embedded via the JavaScript (  your modified version  ) it shows the following:


    <li><script type="text/javascript" src="<?php session_start(); echo "$_SESSION['referrer']; ?>"; ?>"></script> </li>


    So it doesn't look like it is working yet... suggestions?


  • Profile Image
    Answered on March 09, 2012 at 06:45 PM


    Just to add with the previous comments, here are guides on how to capture referring url into your forms:


    Hope that helps :)

  • Profile Image
    Answered on May 11, 2015 at 03:56 PM

    We are very excited to announce that today we launched Form Analytics, a new feature that will let you know more about the traffic of your form, as well as platforms used, conversion rates, devices and locations:

    Form Analytics

     jotform form analytics

    You can see here more details:
    Let us know if we can assist you further.