SOLVED

Capturing UTM Parameters via smart campaign

Go to solution
Highlighted
Level 1

Capturing UTM Parameters via smart campaign

I have a situation where I need to capture UTM parameters in Marketo that are passed to the CRM when a lead fills out a form. The complication is that we are not sending all of our ads directly to landing pages with forms and the UTM parameters are not in the url of the page that the form is on.

Currently we manually track this as lead volume is not huge. This is not ideal and I would like to implement a fix with a smart flow.

My idea is that if I create a smart campaign with a list of Visits page > ANY and querystring is not blank

and a flow of

Write UTM parameter to field (Ideally concatenate to track multiple referrers/visits)

Is that possible and is there a simpler way to accomplish this? Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Capturing UTM Parameters via smart campaign

That's definitely not the way it's done.

You need a UTM persistence JS library (or, more generally, a query string persistence library, since the utm_* params are just well-known query params). This code stores ("persists") the last values in a cookie, so they travel from page to page and can be picked up by Marketo Forms 2.0 Hidden fields. (Fields of type Hidden can be set to Auto-Fill from a cookie of your choosing.)

A simplified example is provided here: https://blog.teknkl.com/quick-and-dirty-utm-forwarder/

There are many more comprehensive takes on the same thing, if you search the Community.

View solution in original post

3 REPLIES 3
Highlighted
Level 10 - Community Moderator

Re: Capturing UTM Parameters via smart campaign

That's definitely not the way it's done.

You need a UTM persistence JS library (or, more generally, a query string persistence library, since the utm_* params are just well-known query params). This code stores ("persists") the last values in a cookie, so they travel from page to page and can be picked up by Marketo Forms 2.0 Hidden fields. (Fields of type Hidden can be set to Auto-Fill from a cookie of your choosing.)

A simplified example is provided here: https://blog.teknkl.com/quick-and-dirty-utm-forwarder/

There are many more comprehensive takes on the same thing, if you search the Community.

View solution in original post

Highlighted
Level 1

Re: Capturing UTM Parameters via smart campaign

Awesome thanks for the quick response! Can you give me a shove in the right direction as to how I would selectively position the script between the scripts below only on form pages? For now I'm just going to drop it globally with tag manager on all pages except those with forms, and then manually place on form pages.

Thanks!

Highlighted
Level 10 - Community Moderator

Re: Capturing UTM Parameters via smart campaign

Awesome thanks for the quick response! Can you give me a shove in the right direction as to how I would selectively position the script between the scripts below only on form pages?

Are you using the embed code, or a Marketo-hosted LP with a named mktoForm container?