Answered

gclid - Data Pulling in data for Zapier

  • 4 October 2021
  • 8 replies
  • 413 views

Hi there,

I read though some of the other posts, but I have an embedded form and the gclid doesn’t seem to be coming through as expected from an embedded form.

I have a hidden field called gclid, as per your instructions.

I have updated the link to the form, which now has data-tf-hidden="gclid=xxxxx" in the embed code.

I’ve also added in data-transferable-url-parameters="gclid" as per instructions.

But the variable isn’t passing through.

Here is the code on the page:

<div data-tf-widget="qU2shQYU" data-transferable-url-parameters="gclid" data-tf-hidden="gclid=xxxxx" style="width:100%;height:650px;"></div><script src="//embed.typeform.com/next/embed.js"></script>

Please can you help me to get this code right so I can start tracking via typeform.

I’m using Zapier to pull the information from typeform, but all I ever get is this

 

 

Any help is appreciated.

 

Thanks,

 

Murray

 

 

icon

Best answer by picsoung 13 October 2021, 05:51

View original

8 replies

Userlevel 7
Badge +6

@Murray - you will need to replace the ‘xxxxx’ string with the appropriate value …. the xxxxx is a placeholder only for what you need to put in place

Hi John, 

Thanks for getting back to me.

No problem, if the value is meant to be pulled through from google ads, my code should be:

 

<div data-tf-widget="qU2shQYU" data-transferable-url-parameters="gclid" data-tf-hidden="gclid=gclid" style="width:100%;height:650px;"></div><script src="//embed.typeform.com/next/embed.js"></script>

 

Or would this just replace my xxxxx with gclid?

 

I want the valuable from my google ad gclid as it passes through, so potentially I wouldn’t provide the value in here, otherwise it would be static (gclid - as per above)?

 

Could I leave it blank, would that pass through the dynamic valiable?

Been trying to work this out for about a week now but I haven’t found the instructions clear.

Thanks,

Murray

 

 

Userlevel 7
Badge +5

Hi @Murray You’ll want to leave that hidden field blank. Google Analytics and Google Ads should be filling in that data for you, so in this case, if you remove the “gclid” after the equals sign, it should automatically fill in the data for you. 

Let me know if this doesn’t work!

Hi Liz, 

Thanks for your response. Still getting nothing unfortunately.

Here is my code, can you tell me what is wrong?

<div data-tf-widget="qU2shQYU" data-transferable-url-parameters="gclid" data-tf-hidden="gclid=" style="width:100%;height:650px;"></div><script src="//embed.typeform.com/next/embed.js"></script>

 

Thanks,

 

Murray

Userlevel 7
Badge +5

Hm. Would you mind sharing the URL where you have the form embedded so I can test this, @Murray ?

Sure, https://murraydare.co.uk/b2b-marketing-strategy.

 

thanks

Userlevel 7
Badge +5

Thank you, @Murray ! I see the issue now - there’s just one item you need to fix. 

If you grab the code directly from the builder, it looks like this: 

<div data-tf-widget="qU2shQYU" data-tf-hidden="gclid=xxxxx" style="width:100%;height:400px;"></div><script src="//embed.typeform.com/next/embed.js"></script>

Though, what you’re missing is the = sign after the “glicd.” You can remove the x’s, but you’ll need that equal sign to pass information. Let me know if that doesn’t work!

Userlevel 7
Badge +5

Hey @Murray 
If I understand correctly you want to pass to the embedded typeform the unique gclid value, is that correct?

Because this value is generated by Google Analytics code for each visitor we would need a way to extract it and pass it to the embedded typeform.

To do so we can’t just use the embed code provided in the Share panel or the Typeform Wordpress Plugin, we would need to create something custom using the Typeform Embed SDK.

The code would look like this:

Before </head> add

<link rel="stylesheet" href=" https://embed.typeform.com/next/css/widget.css" />

Then, where do you need your form to be embedded add:

<div id="embeddedTypeform"></div>

<script src="//embed.typeform.com/next/embed.js"></script>

<script>
let gclid = ga.getAll()[0].get('clientId');
window.tf.createWidget('qU2shQYU', {
container: document.getElementById('embeddedTypeform'),
hidden: { gclid },
})
</script>

Let us know how if this works.

The alternative and probably easier solution would be to use the Google Analytics integration

Reply