SOLVED

Storing UTM values in a global Variable?

Go to solution
Ravi_Ansal2
Level 6

Storing UTM values in a global Variable?

Hi There,

I am starting with the UTM implementation.

I have found few codes on the community and i tried to use it but they are helping me in the way i want.

I want to capture the vale form the cookie level.

But code that i found can only store the value in the Forms on the specific page only. But some of our campaigns will direct people to our resources pages or our product pages.

From there they go ahead and look around about our website and then download few assets. I want to capture there UTM values: Like from which online campaign they got introduced to our website or any page.

I was thinking of implementing Global variables on the website but can this be possible to send these variables to the Marketo level pages?

Is this a correct Approach or should i try something Else?

Help Me with it

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Storing UTM values in a global Variable?

You're on the right track. We have this deployed on our .com site today (utm captured in cookie, stored and transferred through the API upon form conversion), but we don't transfer from non marketo page to marketo page.

I'd assume you can do this though with Munchkin somehow though.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Re: Storing UTM values in a global Variable?

You're on the right track. We have this deployed on our .com site today (utm captured in cookie, stored and transferred through the API upon form conversion), but we don't transfer from non marketo page to marketo page.

I'd assume you can do this though with Munchkin somehow though.

Anonymous
Not applicable

Re: Storing UTM values in a global Variable?

Our web developer is working on solving for this for our new site launch in September. We're testing out with UTM Parameters to track the campaign the lead enters on even if they convert through a different form. And from the tests it sounds like it is going from Marketo page to non-Marketo page but I don't know the backend details other than creating all the fields to be tracked

Ravi_Ansal2
Level 6

Re: Storing UTM values in a global Variable?

Hey Tim McMinn​​/ Emily Dick​,

Thanks for the advice. Can you please help me with the script.

Phillip_Wild
Level 10 - Community Advisor

Re: Storing UTM values in a global Variable?

Hi all

This may or may not help - but Marketo captures the search terms that new visitors come in off. It's capturing the UTM parameters I think - so it seems similar to what you are trying to do.

Phil

Anonymous
Not applicable

Re: Storing UTM values in a global Variable?

We do something similar on our site. I have code that parses the URL, extracts any UTM data and writes them to cookies. Then if a form is submitted the form passes the cookie values as hidden fields. This way a user can land on a page, go to multiple pages on the site and still preserve the UTM information.

Note: you may want to expire the cookies at the end of the session; if the user comes back organically or directly they will still have the previous cookie values otherwise.

Ben

Yanir_Calisar2
Level 3

Re: Storing UTM values in a global Variable?

Ravi Ansal

See this Javascript that captures both first touch and last touch UTM params and storing them in the top level domain ( .yourdomain.com):

UTM-Tracking

https://github.com/yanirclsr/MarTech/tree/master/UTM-Tracking