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.
Solved! Go to Solution.
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.
The code that originally set the cookie doesn't matter: simply add a Hidden field set to Autofill from the cookie.
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?