Streaming live at 10am (PST)

Track URL from where the form was filled


#1

I have created a landing page in the webflow. Now, i want to track who so ever is filling the form coming from which url. As i am running fb and google ads, need to track the url whether a person is coming from fb ads or google ads. I have also add the UTM parameters in google and Fb ads. But is there any way to track them in Webflow.


Hidden text in form submissions
Is it possible to populate a form field with page title?
#2

Add hidden form field using custom code.

<input type="hidden" id="current-page" data-name="Current Page" />

Populate value of the hidden field with JS, Paste in Page Settings > Footer Code:

<script>
$('#current-page').val(location.href);
</script>

#4

Thanks @samliew,

I figured it out, thanks for the help!

Kevin


#5

@kevin.fogarty Hey Kevin - I am curious if you ever figured this out. I did what @samliew suggested, but it does not always show the URL with the UTM in it. For example, if someone lands on my page with this UTM link

https://www.beaconbudget.com/?tab=fitness-tab#utm_source=Facebook&utm_medium=Fitness&utm_content=1

And then they click one of the navigation links, which scrolls down to a section, the URL becomes:

https://www.beaconbudget.com/?tab=fitness-tab#features

You said you figured it out, so I was just curious if your solution was able to store the URL that they landed on the page with and submit it with the form?

Thanks!


#6

Hello @myonke,

Can’t really remember this one but I have been using this which works:

Add this code to your before </body> tag:

<script>
{
 	document.getElementById('hiddenKey02').value = location.pathname;
}
</script>

Then add an embed code anywhere inside the form block and add this then make it hidden before you publish it:

<input type="hidden" class="sourceLogging" id="hiddenKey02" name="formUrl1" data-name="Page URL" value="">

Not sure exactly where I got it from.

Cheers


#7

@kevin.fogarty You’re awesome - thank you for the quick reply!


#8

No worries, my pleasure to help! It’s usually others having to help me!

I found the post BTW:

How to use hidden fields…

All the best