Drawing page data into email? | Community
Skip to main content
New Participant
November 1, 2017
Solved

Drawing page data into email?

  • November 1, 2017
  • 2 replies
  • 5027 views

Using the one Marketo form on multiple pages on our website, is it possible to trigger an email to the user once the form is filled with info on the page / content they filled in the form?

To maybe explain it differently:

Say we have 20 articles sitting on different pages on our website, using one basic Marketo form for the user to fill in their email, this form triggers an email to the user to indicate they have read the article.

How can I somehow map the title of that particular article where the form was filled as a token in the email to indicate which article it was?

This would save having to setup multiple forms and emails for each article published.

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

If the campaign is triggering on Fills Out Form, you don't need a separate field on the lead for the URL: {{Trigger.Web Page}} and {{Trigger.Referrer}} already exist.

The title -- as in HTML <title> tag -- is different because it doesn't have a built-in token associated with it.

Capture the title to a hidden field like so (lastFormURLTitle is an example custom lead field):

MktoForms2.whenReady(function(form){

  form.addHiddenFields({ lastFormURLTitle : document.title });

});

2 replies

November 27, 2017

Hey Dylan,

I'm unsure how to pull in the page title, but we have a similar set up. 1 enquiry form on many different offer pages.

On our enquiry form, we have a hidden custom field (form URL detail) and then our web developers set up a way (javascript) to capture the URL of the page they're on into that hidden field.

Then in the alert email we have "{{lead.Full name}} has filled in the enquiry form on this page - {{lead.form URL detail}}"

That way the sales team know which offer a lead is enquiring about.

Another option is to have 1 form, but multiple smart campaigns using the webpage constraint (fills out form, webpage is www.example.com/article1). Then using the {{SP_Send_Alert_Info}} token in the alert, the name of the smart campaign (named per article) would come through in the alert emails.

Cheers

Katie

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
November 27, 2017

If the campaign is triggering on Fills Out Form, you don't need a separate field on the lead for the URL: {{Trigger.Web Page}} and {{Trigger.Referrer}} already exist.

The title -- as in HTML <title> tag -- is different because it doesn't have a built-in token associated with it.

Capture the title to a hidden field like so (lastFormURLTitle is an example custom lead field):

MktoForms2.whenReady(function(form){

  form.addHiddenFields({ lastFormURLTitle : document.title });

});

DylanBi1Author
New Participant
November 27, 2017

@Sanford Whiteman​

Thanks for the info. When you talk about the {{Trigger.Web Page}}and {{Trigger.Referrer}} is this to determine what page the forms have to be triggered on? If yes, we would need trigger the email no matter what page the form is on.

When it comes to adding hidden field data. Just wanted to check, if I add this to every page the form is on, will it populate the form no matter what page it is on with that specific page title?

Would I then have to add that custom field token into the email, and that is all?

SanfordWhiteman
New Participant
November 1, 2017

Pls move the thread to Products and I'll answer it over there. Move link is at the right.

DylanBi1Author
New Participant
November 27, 2017

Hi @Sanford Whiteman,

I thought it would notify me of a reply to this thread.

I have updated to the products category. I still don't have a solution for this issue.