Get URL parameters passed to form

  • kunalgupta0002
    Asked on September 15, 2014 at 5:40 AM

    Hi,

    I have some affiliates they refer the customers on my website.
    But I need to track the name of affiliate in a hidden textbox to know who actually referred the customer.

    I tried using some thing like this. index.php?form_name=form data . It didn't work.

     

    Can you please advise how to I do it?

    http://form.jotform.me/form/42521664282453

     

    Thanks

    Kunal

     

  • aman_uniyal
    Replied on September 15, 2014 at 9:00 AM

    Hi Kunal,

    I understand your query. For this, you can use Google Analytics. I will guide you step by step to accomplish this:

    1. Insert the Google Analytics code in the header part of your web page by pasting the code in between the <head> and </head> tags.

    2. Once you do it, go to your Google Analytics account and look for "Acquisition" menu on the left side menu-bar.

    3. Under Acquisition, on hitting the "All referrals" button, you will see a table displaying the source, session and all the required details.

    If you still have any unanswered question, feel free to reply to us.

    Thanks

  • Ben
    Replied on September 15, 2014 at 9:06 AM

    Hi Kunal

    I believe that this will help you achieve what you are looking for:
    http://www.jotform.com/help/71-Prepopulating-fields-to-your-JotForm-via-URL-parameters

    In your case, I believe that you would need one more field which would be hidden from the others so that you know who they are from. I created a form that has this field, which would be set like this:

    http://form.jotform.com/form/42574039267965?affiliateId=2

    I have intentionally left it shown for you just so that you can see that the data is transferred.

    If you clone the form all you would need to do is hide it ;)

    Get URL parameters passed to form Image 1 Screenshot 20

    Do let us know however if you have any further questions.

    Best Regards,
    Ben

  • kunalgupta0002
    Replied on September 15, 2014 at 12:36 PM

    Dear ben,

    Thanks for your response.

    I wanted to know how to do this. I didn't ask you to prove that you can do this.

    I looked into the form and it works as I want.

    I noticed that in the URL you wrote " affiliateId=2 " but the text box name is "q8_affiliateId8" .

    So, how would I know what name to put in URL.

    Let's say I want to get the value of Full name from URL then how would I get it?

    what is the name I'll use in URL q3_fullName3z ?

    One more thing

    can I get the cookies enabled for this form

    Thanks in advance

    Kunal

  • Ben
    Replied on September 15, 2014 at 1:29 PM

    Hi Kunal,

    I wanted to know how to do this. I didn't ask you to prove that you can do this.

    Sorry, I did not mean to come across like that. I wished to create a form that you can take a look at and see how it was done, while in the same time you can test it and see it working (before you go into following the steps to recreate it all).

    So, how would I know what name to put in URL.
    Let's say I want to get the value of Full name from URL then how would I get it?
    what is the name I'll use in URL q3_fullName3z ?

    If you have a name that is called 'q3_fullName3z' then you would get it filled out by sending the value to parameter called 'fullName3z' without q3_ in front - so everything after the first _ (underscore) and without it is the parameter name.

    Now the quickest way to find out what exact parameter you should use is to do this:

    Get URL parameters passed to form Image 1 Screenshot 30

    Get URL parameters passed to form Image 2 Screenshot 41

    As you can see, once you click on it it will allow you to change the parameter into anything that you would like :) Of course you should avoid having duplicate parameters.

    Regarding the question about cookies. We must ask you to have one question per a ticket, that way other people searching for the same answers can find it easier and if you ever need to come back to it it will be easy to find exactly what you are looking for as well.

    Best Regards,
    Ben

  • Ben
    Replied on September 15, 2014 at 1:31 PM

    Hi Kunal,

    You will find answers to your question regarding having cookies enabled on your form in the thread here http://www.jotform.com/answers/429078

    Best Regards,
    Ben