SOLVED

Re: How to create a field that grabs the web page the form was filled out on?

Go to solution
Nate_Oosterhous
Level 7

How to create a field that grabs the web page the form was filled out on?

Hello Everyone!

We are looking at creating a field that will grab the web page the form was filled out on.  We then would like to add this as a token in and alert that goes to sales when a form is filled out?  Do anyone have any ideas of how to accomplish this?
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to create a field that grabs the web page the form was filled out on?

@Nate O Easily done with a hidden field.

MktoForms2.loadForm("//app-**01.marketo.com", "***-***-***", 148,
    function(form) 
    {
        form.addHiddenFields({ LastFormURL : document.location.href })    
    });
 

View solution in original post

16 REPLIES 16
Kenny_Elkington
Marketo Employee

Re: How to create a field that grabs the web page the form was filled out on?

Hey Nate,

You'll want to create a smart campaign with Smart List Fills Out Form, and Flow, Change Data Value, MyField, New Attribute is {{trigger.Web Page}}
Nate_Oosterhous
Level 7

Re: How to create a field that grabs the web page the form was filled out on?

Hi Kenny,

I tried that and it doesn't populate the field.  It would be an external web page that we want to populate the field with because the form is on an external web page.  Any ideas?
SanfordWhiteman
Level 10 - Community Moderator

Re: How to create a field that grabs the web page the form was filled out on?

@Nate O Easily done with a hidden field.

MktoForms2.loadForm("//app-**01.marketo.com", "***-***-***", 148,
    function(form) 
    {
        form.addHiddenFields({ LastFormURL : document.location.href })    
    });
 
Tim_Marcacci
Level 2

Re: How to create a field that grabs the web page the form was filled out on?

Sanford Whiteman I know it's been a few years since you posted this, but it was EXACTLY what I was looking for. Dropped the code right in and everything worked flawlessly. Thank you, Sir!!!

SanfordWhiteman
Level 10 - Community Moderator

Re: How to create a field that grabs the web page the form was filled out on?

Great to hear!

Kana_Lai
Level 3

Re: How to create a field that grabs the web page the form was filled out on?

Hi Sanford,

Sorry to reply to such an old post, but I was wondering, would this still work on a webpage that doesn't have any Marketo Munchkin tracking? We need to embed one of our forms on a partner website.

Thanks!

Joe_Barrett
Level 2

Re: How to create a field that grabs the web page the form was filled out on?

Where does the field value (url) go? Is it saved in the person info? How do you use the url in a token inside an email notification sent after the form is submitted? Thanks

SanfordWhiteman
Level 10 - Community Moderator

Re: How to create a field that grabs the web page the form was filled out on?

You’ll have created a custom String field ahead of time. That’s where it goes, and then it’s outputtable like any other {{lead.token}}.

Nate_Oosterhous
Level 7

Re: How to create a field that grabs the web page the form was filled out on?

Hi Sanford,

Would I have our developer put that whole code just like it is with the asterisks and everything in the form we have embedded on multiple external web pages?