Assigning Lead Source & Lead Source Detail form Web Form Fills | Community
Skip to main content
June 30, 2015
Solved

Assigning Lead Source & Lead Source Detail form Web Form Fills

  • June 30, 2015
  • 2 replies
  • 6033 views

I have a client who just re-vamped their web site. When they did this they created Marketo LPs for each of the white papers and other assets on their site in Design Studio. I'm trying to figure out the best way to assign Lead Source and Lead Source Detail for leads who are created when they visit the web site and click through to an LP in order to download an asset. In other words, these are leads who are not part of a program. They found their own way to the LP. What the client wants, in that case is:

Lead Source: Website

Lead Source Detail: Asset Name (which is included in the name and URL of each LP)

I assume I can assign Lead Source to Website with a campaign with this Smart List:

Trigger:

New Lead is Created

Source Type is Web form fillout

Filter:

Member of Program is False

Program is Any

It's the Lead Source Detail I'm not sure how to handle. An obvious solution would be to use a hidden field on the Form(s). But the Form used on their WP LPs is also used by LPs in a number of Programs which contain campaigns that are setting the lead source and lead source detail to reference those programs (E.g., Lead Source: Content Syndication; Lead Source Detail: <CS Vendor Name>).

I can think of 2 solutions but both are fairly laborious:

1) Create Programs for all the Web Site Assets and move the LPs out of Design Studio and into the Programs. Create campaigns in each program to set the Source fields.

2) Create a separate form to be used on LPs for WPs downloaded directly from the web site and use hidden fields (it's laborious simply because there are a large number of LPs).

Does anyone have a better idea (or am I missing something simple and obvious)?

Thanks in advance!

Denise

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

1) The URL for the LP that I'm testing with is info.<company>.com/Web-A-Little-Riak-Book-LP.html

     (I took the company name out because it kept resolving to the page name. You can insert "basho" for <company>)

2) The name of my field is literally "Lead Source Detail"

3) I put the hidden field on the form because in your msg at 10:52 you said "Not instead of the form, in addition to the form."

4) That makes sense about the referrer except that when I look in the activity log at the detail behind fills out form I see "Refferer URL:" followed by the URL for the LP

5) I removed the hidden field from the form but it still doesn't work. 6) Given that the field is literally "Lead Source Detail", how is that extrapolated from your code when your code says "LeadSourceDetail" (no spaces)? Should the code use the API name instead (Lead_Source_Detail__c)? Does it matter that there is a space in the code between "LeadSourceDetail" and the colon?

I appreciate your patience and will totally understand if you can't spend anymore time on this.


Yes, use the API name Lead_Source_Detail__c

The space doesn't matter.

2 replies

SanfordWhiteman
Level 10
June 30, 2015

If the Lead Source Detail is "included in the name and URL of each LP" -- by which I assume you mean the URL has a query param like &assetName=whitepaper1.pdf -- then set a hidden field that pulls the value from that param.

July 1, 2015

Hi Sanford,

All I meant was that the URL for the LP contained the asset name: white-paper123-LP.html.

I forgot to mention the 3rd solution of adding a parameter to the URLs on the client's web site linking to the LPs (in which case your suggestion would work). (That's also a challenge because my contact doesn't know how to do that nor have easy access to a resource who can do it for her).

Thank you!

SanfordWhiteman
Level 10
July 1, 2015

So parse out the page name (document.location.pathname) and set a hidden field from that:

MktoForms2.whenReady(function(form){

    form.addHiddenFields({ LeadSourceDetail : document.location.pathname});

});

July 1, 2015

Even easier:

  1. Add a field to your form "Source"
  2. Change the field type [in form editor] to "hidden"
  3. Set the Autofill option by clicking on "edit" and type what you want set your source as i.e. - Website

block field updates

Now when ever the form gets completed and a lead is generated, the "Source" field will be populated with "Website"

AND, to stop this being over-ridden if they fill in another form, go to admin > field management > field actions > block field updates

          Select from the list which methods you want to block, I always select Form Fill, Flow change, Lead detail fill, Web Service API, Webhook

          This still allows you to update it with a workflow, but stops sales changing it or another form over-ridding the original value.

Then just make sure the field is mapped through your connector and you have the corresponding setup created in your CRM.

SanfordWhiteman
Level 10
July 1, 2015

How does that fill in the Lead Source Detail?