Pushing Google Cookie Data to Hidden Fields

Highlighted
Anonymous
Not applicable

Pushing Google Cookie Data to Hidden Fields

Hi All!

I recently installed a script on my site that generates the Google UTMz cookie and parses out a handful of variables about campaign source, medium, referral, etc. The only problem I'm having is I'm not quite sure how to actually push that data I am generating into my Marketo forms when someone submits. Below is a screenshot of my Javascript console with an Analytics Debugger once that all gets triggered.

Screen Shot 2017-02-16 at 11.38.55 AM.png

Anyone have any idea how to push those fields to a form? Thank you all!

2 REPLIES 2
Highlighted

Re: Pushing Google Cookie Data to Hidden Fields

HI Michael,

The typical way to do this is to capture this data with hidden fields in the Marketo forms, using the "cookie value" feature for hidden fields.

so create the UTM's fields in Marketo, add them to your forms, then in the field properties in the form, change the type to hidden. The hit the "Autofill" edit link:

pastedImage_3.png

Finally, in the autofill, choose cookie value, and add the cookie name in the parameter name:

pastedImage_2.png

YOu can also do this through JS code if you have a developer who knows how to use the forms 2.0 API.

-Greg

Highlighted
Level 10 - Community Moderator

Re: Pushing Google Cookie Data to Hidden Fields

Michael, isn't this the exact same question answered in your other answered thread? I don't understand why you're asking it again.