UTM parameters not firing on Marketo form submissions | Community
Skip to main content
March 20, 2018
Question

UTM parameters not firing on Marketo form submissions

  • March 20, 2018
  • 1 reply
  • 7500 views

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)?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
March 21, 2018

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
March 23, 2018

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
March 23, 2018

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.