Salesforce’s Web-to-Lead Forms: A Complete Guide

Laura Caveney
24th February 2022

Salesforce web-to-lead forms are an out of the box solution for marketers to track lead source. But are they enough? We explore the limitations of web-to-lead forms and how you can plug the gap. 

91% of marketers say that lead generation is their most important goal. And it’s no surprise. For B2B businesses, in particular, generating leads is the marketing team’s bread and butter. 

But while we found 84% of marketers use form submissions as a lead conversion tool, 36% of them struggled to accurately track them. 

While web-to-lead forms go part of the way to support marketers to better track their lead conversions, they only go so far. 

When 40% of marketers state that more accurate data would improve their marketing outputs, it’s clear that something needs to be done to better support marketers make an impact. 

In this blog, we’ll look at: 

So, let’s get started! 

💡 Pro Tip 

Want to skip the blog and read more about supercharging your Salesforce data? Download our eBook to learn more about how you can get the data you need in and out of your CRM

What are web-to-lead forms in Salesforce? 

Web-to-lead is a process you can apply to your website forms that allows marketers to automatically push form submissions on their website into their Salesforce CRM. 

They automatically capture visitor information and store it directly into Salesforce. 

As a default, Salesforce provides the following lead sources: 

Web-to-lead on your website forms automatically assign their leads under the ‘web’ category. 

While you can create new lead source types for your picklist, these cannot be accurately attributed by Salesforce itself. To get an accurate lead source, you would need to integrate your CRM with an attribution tool. 

💡Pro Tip

Read how you can automatically add your lead source in Salesforce and use that data to attribute revenue back to your marketing

How to create Salesforce web-to-lead forms

You can easily create Salesforce web-to-lead forms. 

In Salesforce Classic, head to Setup, Customise, Leads and then Web-to-Lead. Or, if you’re using Salesforce Lightning, go to Setup, Feature Settings, Marketing and then Web-to-Lead

Web To Lead Salesforce setup
Web To Lead Salesforce setup details

Once you’ve done that, you will see a short piece of HTML code. 

Copy and paste the HTML code into your website. Remember, you can edit the CSS of this code if you need to. 

Once this is done, whenever a user submits a form, a lead record will be created in Salesforce with the lead source ‘web’.

From there, you can send automated email follow-ups through Salesforce to nurture them through their customer journey or push them directly to a sales rep to close. 

🔗 Want to learn more? Follow Laura on LinkedIn to keep up to date with tips and tricks on tracking your pipeline in your CRM and marketing analytics

What data do Salesforce web-to-lead forms capture? 

Web-to-lead is just a process that allows Salesforce to pull data from your website forms into your CRM. 

As such, it can capture whatever data you need it to. You can see a full list of lead fields available in Salesforce here. 

Remember, if you want to track specific fields that Salesforce doesn’t already have, you can create new ones. Here’s how to map custom lead fields in Salesforce.

Plus, your web-to-lead forms will automatically be attributed to ‘web’. Keep reading to see how you can get more data on your lead source. 

Related: How to track original lead source in Salesforce 

For more, check out guidelines on setting up web-to-lead in Salesforce. 

Why web-to-lead forms aren’t enough 

Don’t get us wrong, being able to automatically push your leads from your website to your Salesforce CRM is a great step. 

But there are a few key issues with how web-to-lead works. Let’s discuss them one by one: 

Web as a lead source is too generic 

When marketers are using up to 13 different marketing channels to disseminate their content, assigning all lead forms to ‘web’ feels pretty reductive. 

You can’t class organic Google, PPC and email marketing as the same source. There are different campaigns at play, different levels of time and budget, and so much more. 

While web-to-lead defaulting to ‘web’ will give you an indication of the impact of your website as a whole, it doesn’t help you pinpoint what exactly is working. 

Lead source is just one touchpoint 

While ‘web’ is too generic to really understand, even if you could get more granular detail, web-to-lead only provides you visibility of that one touchpoint. 

Let’s use an example. 

Sara visits your website for the first time via a PPC advert. She leaves with no further action. 

tracking customer journey

A few days later, she returns via a paid Facebook ad. Again, she doesn’t convert and leaves the site. 

Later, she lands on your site via an organic search. During this session, she converts into a lead by filling in a form. 

Now let’s say for argument’s sake you could pull through more detail on her lead source than just ‘web’. In Salesforce, you would instead see the lead source as ‘organic’, but is this giving you the full story? 


With just this view, you’re completely missing the impact your two paid campaigns have had on Sara’s customer journey. 

💡 Pro Tip

Want to track full customer journeys? Read our handy guide to see how you can track every touchpoint a user has with your site and build a reliable customer journey from end to end. 

tracking sara's customer journey in ruler analytics

Leads don’t guarantee revenue 

Leads are important to track. But while leads are a good indication of marketing success, they don’t guarantee sales or revenue. 

While web-to-lead gives you a good insight of your lead success, your data is still siloed. 

Think about it like this. 

Anonymous users land on your website and engage with your content and pages. When they convert, they’re fired over to your CRM, but all of that website data remains anonymous. 

That means when you come to attribute your closed revenue, you’re at a loss because you can’t access that data. 

Related: How to attribute closed revenue to your marketing

When you’re missing revenue data, you’re basically marketing blind. You’re setting live and optimising campaigns based on much less actionable metrics like lead volume and clicks. 

How to fill the gap in your Salesforce CRM 

So how can you go beyond web-to-lead data? Marketing attribution. It’s the best way to get a real view of your marketing impact on your bottom line. 

Related: Best marketing attribution tools to integrate into your stack 

Forget optimising your marketing on metrics that don’t move the needle. 

With a marketing attribution tool, you can accurately determine which channels, campaigns, ads and even keywords are impacting revenue. 

Take a tool like Ruler Analytics. With this in place, you can get eyes on that anonymous website data we talked about before. 

Here’s how it works. 

Users anonymously visit your website. Ruler users first-party cookies to track what content they engage with and what influenced that session. 

Every time users return, Ruler will harvest that data and collect it against one single user. 

When that user converts, whether that’s via form, call or live chat, Ruler will fire all of the marketing data held on them over to your CRM. Plus, you’ll be able to view their full customer journey in your Ruler report. 

ruler analytics tool integration

Related: How to track every customer touchpoint with Ruler Analytics 

As the users continue to engage with you, their customer journey will grow in Ruler. Finally, when they close into a sale, Ruler will scrape the revenue data inputted into Salesforce and send it out to the relevant marketing tools. 

You’ll be able to send closed sale data to tools like Google Analytics, Facebook Business Manager, Google Ads and more. 

This data will be accurately attributed to the relevant channels, campaigns, ads and keywords where you can see exactly how much revenue each has contributed to. 

Related: How Ruler attributes revenue to your marketing

Get more than web-to-lead data in Salesforce 

Want to get more insights into your marketing impact? Finding that web-to-lead just isn’t pulling enough data through?

While it’s a popular method of capturing leads and pushing them to Salesforce, you’re missing data. By integrating a tool like Ruler Analytics into your stack, you can get a better idea of your full customer journeys and view closed revenue against channels, campaigns and even keywords. 

Book a demo of Ruler Analytics to see exactly how it can supercharge the data you currently have in Salesforce. Or, join our mailing list to learn even more tips to upgrade the data in Salesforce.

Web-to-Lead Form FAQs

Yes, you can have multiple web-to-lead forms from multiple websites or landing pages, all sending leads to Salesforce and either capturing the source of the lead or associating it with a particular campaign.
To create your web-to-lead code, you need to set up your form. You can do this via Setup > Customize > Leads > Web-to-Lead or via Setup > Feature Settings > Marketing > Web-to Lead depending on your Salesforce account.
Web-to-Case is new Salesforce feature that helps you gather customer support requests directly from your company's website and automatically generate up to 5,000 new cases a day. These can be fired to your team to help them respond to customers faster.