How do I track the URL for a Web form submission?

Leanne_Persang
Level 4

How do I track the URL for a Web form submission?

We have a "Request Information" Marketo form on all product pages on our website. I'd like to know when a user submits the form what product page he/she submitted the form on. How do I track that?

I thought it was by using a hidden Lead Source field on the form and getting the value from the URL parameter, but what would the Parameter Name be? The website URLs do not have parameters defined.

pastedImage_0.png

Thanks for the help!

Tags (2)
4 REPLIES 4
Devraj_Grewal
Level 10 - Champion Alumni

Re: How do I track the URL for a Web form submission?

You can use the filter or trigger "Filled/Fills out form" and there is an available constraint of "Web Page:". The drop down list will include all web pages where that form is embedded.

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I track the URL for a Web form submission?

Better to use the constraint of Referrer, since it will allow for matching on the entire URI.

Leanne_Persang
Level 4

Re: How do I track the URL for a Web form submission?

Hm, not sure this would be feasible since the form is used on hundreds of product pages. Would not be able to list every possible URL in the referrer.

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I track the URL for a Web form submission?

You are correct, the hostname and pathname of the URL aren't directly mappable to hidden fields in Form Editor. But it's very easy to do the same using the tiny bit of code I posted here: https://nation.marketo.com/message/79664#comment-79664