Need help creating JavaScript code to convert Google URL parameters into cookies

Eunice_Leung
Level 2

Need help creating JavaScript code to convert Google URL parameters into cookies

Hi -

As many users have expressed before, by using smart campaign to do a data query on the Original Referrer field does not provide reliable information for us to determine if PPC is working or not. It's simply because "gclid" details do not always come through, we have tested it and it only come through 30% of the time. We followed the suggestions listed in the documents below but got stuck on the JavaScript.

We have created the 4 custom fields: Campaign Source (utm_source), Campaign Medium (utm_medium), Campaign Term (utm_term), CampaignID (utm_campaign). According to instructions on this page Linking a Google Adwords Ad to Any Page on Your Website , we should put JavaScrip on our site and on all of our Marketo Landing page or templates. But the JavaScript coding provided on this page https://nation.marketo.com/docs/DOC-1101​ does not contain anything related to those 4 fields. So how will the codes help populate the  fields?

The instructions on Linking a Google Adwords Ad to Any Page on Your Website also directed us to configure hidden page but what configuration is it? Does it mean the act of adding the 4 fields, making them hidden and then setting the default value or using the URL builder?

The bottom line is, we wanted to ensure that all clicks and form fills from Google Ads are tracked in the "Original Referrer" field. And that we can measure what exact Google AdWood Campaign and Keyword generate the Leads and perform other ROI analytics. Has anyone done this that can give us some insights? Thanks much!!

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Need help creating JavaScript code to convert Google URL parameters into cookies

I recommend you use ConversionPath (see http://ConversionPath.io). Does all the touch tracking + cookie persistence + Marketo forms integration you need for this.