UTM parameters not firing on Marketo form submissions

Anonymous
Not applicable

UTM parameters not firing on Marketo form submissions

When the incoming traffic comes to our site, on the first instance we get UTM parameters within the URL query string parameter (i.e. utm_campaign=XYZ, utm_source=ABC, utm_medium=facebook, etc.).  The problem we're running into is that this query string parameter doesn't fire on the form submissions within the Marketo pages (since it only fires at an entry-perspective). Is there a solution that could somehow track that initial entry parameter when the form is submitted (a number of pageviews down the line)?

8 REPLIES 8
SanfordWhiteman
Level 10 - Community Moderator

Re: UTM parameters not firing on Marketo form submissions

There are a number of ways to do this, like my simple UTM forwarder or Yanir's UTM tracking JS.

At this basic level, all the approaches are by nature the same, they just differ in configurability:

     [1] persist query parameter to cookie, cookies, localStorage, or sessionStorage

     [2] restore to form fields, either using Form Editor's built in Hidden field » AutoFill or Forms API addHiddenFields().

Tim_Marcacci
Level 2

Re: UTM parameters not firing on Marketo form submissions

Hi Sanford,

I read your blog post on this and, before I go down the path of implementing your suggestions, I have some questions:

Is this what is necessary for the UTM parameters to be passed through Marketo forms and back into GTM? Essentially the issue we are having (which I believe is the same as the original poster) is that the UTM parameters that are included when someone clicks on one of our advertisements are not being passed through the form. Essentially, upon form submission (our goal conversion), the referrer in GA is showing "mkto-f0095.com / referral" as the Source/Medium in GA rather than the original UTM parameters from when they arrived on the landing page. This means we are unable to correctly track the success of our ads when the forms on our landing pages are being filled.

The solution in your blog post sounds like it saves the UTM parameters in Marketo fields, but doesn't solve the issue with the parameters being passed through for GTM to see. Please correct me if I am wrong. Any help is greatly appreciated!

On a side note, I did have our agency change the tag script from .onsubmit to .onsuccess based on your recommendations on other posts. Thanks!

-Tim

SanfordWhiteman
Level 10 - Community Moderator

Re: UTM parameters not firing on Marketo form submissions

The solution in your blog post sounds like it saves the UTM parameters in Marketo fields, but doesn't solve the issue with the parameters being passed through for GTM to see. Please correct me if I am wrong. Any help is greatly appreciated!

Well, yes and no.  If you use my code first before GA, that makes sure that GA initializes after the query string is restored to its original state, hence it will see the UTM parameters. It has no idea that they weren't there when the page started loading, it only knows if they're there by the time GA looks for them.

Tim_Marcacci
Level 2

Re: UTM parameters not firing on Marketo form submissions

Good to know! I will go ahead and give your UTM forwarder a shot then. This is the only method that I've come across that sounds like it will solve my specific problem. Thanks for your help!

Tim_Marcacci
Level 2

Re: UTM parameters not firing on Marketo form submissions

Hi Sanford,

I've implemented your solution and all seems to be working! We set the forwarder to expire in 1 day. One thing I've noticed is that throughout the day, the URL is building up with lots of "&" symbols as you can see in the screenshot below. Is that just part of the forwarder functionality?

Capture.JPG

This is live, so you can test it directly on our site (www.XIFIN.com) if you're interested.

Thanks,

Tim

SanfordWhiteman
Level 10 - Community Moderator

Re: UTM parameters not firing on Marketo form submissions

Yeah, that's because the code is (was) deliberately lazy w/URL parsing -- if you grab the code from the post now it doesn't do that.

Tim_Marcacci
Level 2

Re: UTM parameters not firing on Marketo form submissions

Hi Sanford, I'm also noticing that it's also forwarding mkt_tok tracking code from emails in addition to utm parameters. Will this negatively affect Marketo's tracking ability/accuracy in any way?

SanfordWhiteman
Level 10 - Community Moderator

Re: UTM parameters not firing on Marketo form submissions

Nope, that's fine.