SOLVED

Using a hidden form field to send url of external page Marketo form is on/filled out from

Go to solution
Brittany_Berli1
Level 2

Marketo's documentation on this isn't very clear for me so I'm hoping someone can help.

 

We have one Marketo form that is embedded on multiple pages on our website.  The internal stakeholders would like form fills to include the url of the page the person filled out the form on, so they can tell which pages are getting more form fills.

The pages do not have querystrings in their url's so I'm not sure parameters will work for this.

 

Is there a way to get the url into a hidden form field?

 

Otherwise I guess my other option would be to create smartlists and use the referrer constraint to split out each page the form is on.

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

1. Add the custom String field LastFormURL to your instance.

 

2. Use this simple JavaScript to pass that hidden field for every form fill:

MktoForms2.whenReady(function (form) {
    form.addHiddenFields({ LastFormURL : document.location.href });
});

View solution in original post

10 REPLIES 10