Understanding form fill UTMs - URL Parameters vs Cookie Value | Community
Skip to main content
April 20, 2016
Solved

Understanding form fill UTMs - URL Parameters vs Cookie Value

  • April 20, 2016
  • 1 reply
  • 4565 views

Trying to get a better understanding of how our UTM fields are being populated.

To my understanding, on our landing pages we have scripts that append the UTM's on the Cookies.

So when I create the hidden value on the form, I can select Get Value from "Cookie Value".

There are times where the value is blank and will grab the default value.

But we also provide UTM tags using URL Parameters to our advertising agency for display ads.

But, form fills using those links, are coming with blank UTM values.

Is selecting get value from "URL Parameter" vs "Cookie Value" on a form exclusive option?

And is there a way to tell the from to get it from the cookie first and if value is blank get it from the URL? or vis versa?

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

I'm looking at the code and there are actually two problems.

One is that the person who wrote it didn't use the Forms 2.0 API correctly, so the code is basically guessing about whether the form is loaded before it copies current the URL parameters into form fields. That is, if the form is not yet ready, there's nowhere for the values to go, so they are just thrown away.  (You may not even realize that there's code intended to do this, since it doesn't work reliably.)

It also seems that the code to copy URL params to individual cookies isn't present on the page.  So it's not a question of load order but of whether the script is running at all.

I think you should have a dev review the code for both placement and proper operation.

1 reply

SanfordWhiteman
New Participant
April 20, 2016

(You should post in the Products space going forward -- that's the main support question-and-answer board.)

If you're always saving the current UTM parameters to cookies, you just need to make sure that helper script runs and completes before the form loads.  Sounds like you're loading the form before your script copies query params --> cookies, so at the time the form loads there aren't any cookies to find. Does that make sense?  If you send me an actual URL with a form I can tell you what's up with the order.

April 20, 2016

Hi @Sanford Whiteman,

​What you said about the script completing before the form loads makes sense.

I did not create the page and no longer have access to who created it to ask, but know there are random scripts placed in difference areas on the page.

​Here is the link that I am unable to get the hidden UTM field to grab from either Cookie or URL - Gartner Report: Magic Quadrant for Enterprise Int...

Are you able to tell me if script completing before form loads is the case? and if so is it an easy fix?

Thanks

Bryant

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
April 20, 2016

I'm looking at the code and there are actually two problems.

One is that the person who wrote it didn't use the Forms 2.0 API correctly, so the code is basically guessing about whether the form is loaded before it copies current the URL parameters into form fields. That is, if the form is not yet ready, there's nowhere for the values to go, so they are just thrown away.  (You may not even realize that there's code intended to do this, since it doesn't work reliably.)

It also seems that the code to copy URL params to individual cookies isn't present on the page.  So it's not a question of load order but of whether the script is running at all.

I think you should have a dev review the code for both placement and proper operation.