How do you pass a Google Analytics cookie parameter web a Marketo form is submitted? | Community
Skip to main content
David_Barnes
Level 2
December 22, 2020
Solved

How do you pass a Google Analytics cookie parameter web a Marketo form is submitted?

  • December 22, 2020
  • 1 reply
  • 4099 views

We’re setting a cookie in Google Analytics when the url has a certain parameter and we would like to check to see if that cookie is present and, if it is, pass the data parameters from the cookie as hidden form values when a Marketo form is submitted; utm_source, utm_medium, utm_campaign, etc. Is this even possible? I’ve scoured the Internet for a working solution to this issue.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Well, if the cookie name is

 

__gtm_campaign_url

 

naturally the Hidden field needs to Autofill from that cookie!

 

You have other cookies in your screenshot.

1 reply

SanfordWhiteman
Level 10
December 22, 2020

The code that originally set the cookie doesn't matter: simply add a Hidden field set to Autofill from the cookie.

David_Barnes
Level 2
December 22, 2020

We set the "Get Value From" to "Cookie Value" but the data did not pass within the lead info. The issue could be that the cookie's value is a long url parameter that might need to be segmented out or maybe it was an issue with the naming of the parameter.

 

Here is the name and value for the temporary cookie we have set:
name: 

__gtm_campaign_url


value: 

https%3A%2F%2Fwww.floorforce.com%2F%3Futm_source%3DILoveCookies%26utm_medium%3DChocolate%26utm_campaign%3DPermanent%26utm_term%3Dcookie%26utm_content%3DcookieJar

 

Should the parameter name be changed to the name of the cookie?

David Barnes
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
December 22, 2020

Well, if the cookie name is

 

__gtm_campaign_url

 

naturally the Hidden field needs to Autofill from that cookie!

 

You have other cookies in your screenshot.