Track GCLID using URL parameters

  • titan_vans
    Asked on February 1, 2023 at 2:26 PM

    I'm looking to capture GCLID from the url through a hidden field. Is that possible? And if so how do we do that?

    Is there any ways we can track GCLID through URL parameters?


  • Fahad JotForm Support
    Replied on February 1, 2023 at 4:33 PM

    Hi titan_vans,

    Thanks for reaching out to Jotform Support. You can achieve this by prepopulating the hidden field with the GCLID value using URL parameter method. you can create a hidden field in your form and use its unique name as a URL parameter to capture the GCLID in the hidden field.

    1675287082 63dada2a7451b  Screenshot 10

    You can pass URL parameters to populate GCLID: https://form.jotform.com/230316652802045?gclid=3272_ASS_2382, You can check the demo form.

    Give it a try and let us know if you have any other questions.


  • titan_vans
    Replied on February 6, 2023 at 2:06 PM

    I tried changing the unique name to "gclid" but when i refresh the page it ads 3 numbers at the end of it. I've been testing it with a Google representative and it's still not working

  • Danilo JotForm Support
    Replied on February 6, 2023 at 4:48 PM

    Hi TItan_vans,

    Thanks for getting back to us. I looked over your form and noticed that you have two GCLID fields. The first is on the first pages, and the second is at the bottom of your form, which is why it adds the numbers. You must remove one of them and ensure that the one that remains is the correct Unique name you entered.

    1675719878 63e174c6c9204  Screenshot 10

    Give it a try and let us know if you have any other questions.

  • titan_vans
    Replied on February 8, 2023 at 9:44 AM

    Thank you!

  • gustaverihal
    Replied on February 21, 2023 at 8:04 AM

    Hello Fahad,

    I have a question about this method. If we use the form url and add the gclid as mentioned above, it works. But what if, for example, I use a landing page created on Leadpages containing my form. Is this method still valid? Because this is the method we used a few months ago (which worked well), but which no longer works. How to do ?

    The problem is that the GCLID information in the url is no longer retrieved by the hidden gclid field of the form when the user submits.

    We use landing pages like this:

    https://www.comparateurpro.fr/assurance-iard-lp-test-gclid/

    Is there a new jotform option that I missed activating?

  • Annaliza_O Jotform Support
    Replied on February 21, 2023 at 8:27 AM

    Hi TItan_vans,

    Thanks for reaching out to Jotform Support. Try to embed your form using the iFrame code then add the pre-populated URL in the "src" field. 

    Here's an example:

    TDaalpG Screenshot 10

    Where in the highlighted URL is the prepopulated form. You can also try to get your form's full URL through this application: https://prepopulate.jotform.io/

    For your reference: Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters

    Keep us updated and let us know if you need any more help.

  • titan_vans
    Replied on March 27, 2023 at 11:03 AM

    So we're having a lot of issues getting the GCLID captured. Here's the last email i received from the Google team:

    Hi Amir,

    Thank you for your patience. 

    I've double checked everything and even though we're customizing the tracking code, it's not letting the GCLID capture because the URL parameter changes due to iFrame.

    I'd request you to get in touch with Jotform as this is something we can't do because of the iFrame platform. 

    Or if possible for you to make the forms part of your website and not iFrame then we can get the codes customized to save the GCLID in local storage.

    I hope the above information helps. Please feel free to reply in case of any questions. 

    Sincerely,


    Md Khalid

     

    NB: If you need to reference this support ticket in the future, the ID number is 4-0421000033583


  • Harshad_P JotForm Support
    Replied on March 27, 2023 at 12:59 PM

    Hi TItan_vans,

    Thanks for getting back to us. I am sorry the issue still persists on your side. Could you please try using the regular Embed code instead of the Iframe and it should solve the problem. Let me show you how to get the regular Embed code.

    1. In the Form Builder, click on publish.
    2. Click on Embed on the Left Panel.
    3. Click on the first option Source Code and click on Copy Code.
    1679936328 6421cb4852e77  Screenshot 10
    Thats it, you can use this code to embed your form on the website.

    Give it a try and let us know how it goes.

  • titan_vans
    Replied on March 28, 2023 at 3:33 PM

    Hi I did try to embed the source code on my html pages. But when I'm testing it creates the following error on the third page. Is there anything I can do to fix it?

    titanvans.com/build-price/classic-bp-test


  • Danilo JotForm Support
    Replied on March 28, 2023 at 5:09 PM

    Hi titan_vans,

    Thanks for getting back to us. I tried to access the link you provided, and it appears you're referring to this error? Could you please confirm whether you made any changes to your form? If this is the case, you must re-embed the form because minor changes may have an effect on it. 

    1680036772 642353a432b15  Screenshot 10We have several options for Which Form Embed Code Should You Use. We strongly advise using Iframe code. It is very simple to embed your form on a webpage. Let me show you:

    • In Form Builder, in the orange navigation bar at the top of the page, click on Publish.
    • In the menu on the left side of the page, click on Embed.
    • Now, click on the embed option you want to use, and copy the code.
    • That's it. Embed your link on your webpage and you're done.

    1676991741 63f4dcfda9b12  Screenshot 21

    1676991753 63f4dd095142f  Screenshot 32

    Reach out again if you have any other questions.

  • titan_vans
    Replied on March 28, 2023 at 5:37 PM

    I created a new page and did what you recommended (titanvans.com/build-price/classic-bp-test2)

    The problem is still the same.

  • Israel JotForm Support
    Replied on March 28, 2023 at 10:38 PM

    Hi titan_vans,

    Thanks for getting back to us. It would help us to understand what’s happening if you could send s screenshot of the error and send it to us.  Please click here to see how to share images with us. This will help us to investigate the problem further.

    Once we hear back from you, we'll be able to help you with this.


  • titan_vans
    Replied on March 29, 2023 at 11:29 AM

    You guys already know what is the error. You can see it on Danilo's response

  • Shirized Ina Garces JotForm Support
    Replied on March 29, 2023 at 12:02 PM

    Hi titan_vans,

    Thanks for getting back to us. When I tested your actual form, everything worked the way it was supposed to. But, the error only shows when the form is embedded on your website.

    1680105525 6424603589c9e  Screenshot 10

    As suggested by my colleague, can you try embedding your form using other Embed Codes like Iframe code method? This is designed to work on any web page. But, you can try other Embed Code options we have.

     If you're still having the same problem, we'll do a more in-depth investigation and work on finding a solution.

    Keep us updated and let us know if you need any more help.

  • titan_vans
    Replied on March 29, 2023 at 12:53 PM

    I guess you haven't read the entire thread. We are currently using iframe, but the issue is that the iframe version does not capture Google's offline tracking GCLID . We've been working closely with Google and they told us that the issue was the iframe. So one of your colleagues suggested to embed the code and this is how we got here. I'm testing the code embed on the "test versions" and it's not working.

  • Gaud JotForm Support
    Replied on March 29, 2023 at 2:28 PM

    Hello titan_vans,

    Thanks for reaching out to Jotform Support. I'm sorry that issue is still not resolved yet. I understand that the issue is not resolved even though you have used the I-frame, and normal embedding method. I also noted your point that you are working closely with Google currently. Please allow me some time to check a few things from my end. We’ll get back to you as soon as we have an update.

    We appreciate your patience.

  • Gaud JotForm Support
    Replied on March 29, 2023 at 3:44 PM

    Hello titan_vans,

    Thanks for patiently waiting. I want to apologize on behalf of my team members who have incorrectly suggested you use source code, and the I-frame method to embed your form. Please, note that the normal script method will help you to resolve an issue. It will be the first one in the embed options, right above the source code.

    Let me show you where you find the normal script method with my test form:

    1680118937 64249499501e6  Screenshot 10

    Let us know how it goes.

  • titan_vans
    Replied on March 30, 2023 at 5:43 PM

    Are you serious? This javascript snippet just generates the same iframe.

  • Rene JotForm Support
    Replied on March 30, 2023 at 11:49 PM

    Hello Titan,

    I'm sorry that this is happening. It seems that the codes aren't compatible with your webpage codes making some features in Jotform doesn't work when the form is embedded. Just to confirm, have you already tried all the available codes present in the published tab? Do all the codes point out the same error?

    Once we hear back from you we can be able to move forward with a solution.