Capturing UTM Values for Known User

agolove
Level 2

Capturing UTM Values for Known User

I am trying to capture the UTM parameter on form fills regardless if the marketo engagement is a known visitor or not, without using Smart Campaigns to write to the UTM fields.

 

We embed our Marketo forms to WordPress and Webflow landing pages.

Our forms have hidden fields set up and work for new users, but are cleared for known visitors.  We use Known Visitor HTML on these forms and we recently added a recommended JavaScript workaround (https://nation.marketo.com/t5/product-discussions/how-to-add-utm-parameters-to-quot-known-visitor-qu... aka https://codepen.io/figureone/pen/jOWVZMg (CodePen Home MktoForms2 :: Auto-Fill w/Cascade v1.1.2) to our pages. This recommended JavaScript workaround is a partial success, as the values are stored, but the hidden field values are not being written without using a Smart Campaign.


Is there an extra step needed so the UTM Fields are written to for known visitors without a Smart Campaign?

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Capturing UTM Values for Known User

No Smart Campaign is ever needed, only the JS if you’re using KV HTML.

 

Please link to your page.

agolove
Level 2

Re: Capturing UTM Values for Known User

SanfordWhiteman
Level 10 - Community Moderator

Re: Capturing UTM Values for Known User

Can't see where you've deployed my code to hidden-field-enable KV HTML.

 

None of these occurrences of MktoForms2 contain that code:

SanfordWhiteman_0-1721934209843.png

 

Can you point to the file that contains that JS?

agolove
Level 2

Re: Capturing UTM Values for Known User

SanfordWhiteman
Level 10 - Community Moderator

Re: Capturing UTM Values for Known User

That's the Forms 2.0 standard JS. I mean the custom JS.
tdracolakis
Level 1

Re: Capturing UTM Values for Known User

Is this the case for all pages (Wordpress, Webflow), or only Marketo landing pages?

SanfordWhiteman
Level 10 - Community Moderator

Re: Capturing UTM Values for Known User


Is this the case for all pages (Wordpress, Webflow), or only Marketo landing pages?

It applies to any use of the KV HTML.