Storing UTM values in a global Variable? | Community
Skip to main content
Ravi_Ansal2
New Participant
August 12, 2015
Solved

Storing UTM values in a global Variable?

  • August 12, 2015
  • 6 replies
  • 4850 views

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

Best answer by

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.

6 replies

Yanir_Calisar2
New Participant
October 4, 2017

@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

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

April 12, 2016

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

New Participant
August 13, 2015

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

Ravi_Ansal2
New Participant
August 13, 2015

Hey Tim McMinn​​/ Emily Dick​,

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

August 12, 2015

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

Accepted solution
August 12, 2015

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.