SOLVED

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

Go to solution
David_Barnes
Level 1

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

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.

David Barnes
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

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.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

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

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

David_Barnes
Level 1

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

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

 

Screen Shot 2020-12-22 at 9.01.11 AM.png

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

David Barnes
SanfordWhiteman
Level 10 - Community Moderator

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

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.