Re: Is there a way to pull UTM parameters into Marketo for pageviews, without a form fill?

Julia_Delay
Level 1

Is there a way to pull UTM parameters into Marketo for pageviews, without a form fill?

I would like to see UTM parameters in the details of EVERY pageview activity in Marketo. 

Right now, the only way I am able to see UTM info is with a form fill, it it updates if the person fills out a new form with new UTM info. Is there a way to have that added into the activity of a pageview?

Tags (2)
4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a way to pull UTM parameters into Marketo for pageviews, without a form fill?

Yes and no.

The query string (the entire query string) is a constraint on any Visit Web Page activity, you can definitely see it there.

If you want individual query items (such as UTM params) to populate lead fields as a result of VWPs, you need to use a combo of JavaScript and a webhook.

Julia_Delay
Level 1

Re: Is there a way to pull UTM parameters into Marketo for pageviews, without a form fill?

Any idea why it's blank for me/how to fix that? activity.PNG

SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a way to pull UTM parameters into Marketo for pageviews, without a form fill?

Any idea why it's blank for me/how to fix that? 

Because there simply weren't any query params on that hit.

Jay_Jiang
Level 10

Re: Is there a way to pull UTM parameters into Marketo for pageviews, without a form fill?

to "fix" that, mod your .htaccess file (if using apache) to add a query string if nothing's there already.

Alternate but less optimal solution using javascript (will only work for some newer browsers):

var queryString = window.location.search;
if(!queryString.length){
window.history.pushState("object or string", "Title", window.location + "?utm_source=none");
}

Add this to the <head> tag before the munchkin script so hopefully munchkin fires after this has done its job