Skip to content

Get Marketing Channel Attribution Data into Salesforce

Salesforce records what a lead did after they arrived, but the path that brought them there often stays outside the record.

This guide explains a hidden-field approach that writes channel, campaign and landing-page details onto the lead itself, so reports can connect pipeline and revenue back to the marketing that produced them. Below you will find the setup sequence, a field map, a compatibility check and the points worth testing before you roll it out.

How the hidden-field handoff works

The mechanism is deliberately simple and runs in four stages.

  1. Your lead form carries a small set of hidden fields. These are not visible to the visitor and exist only to receive attribution values.
  2. While a visitor browses, the attribution layer observes which marketing channel they arrived from and writes those values into the hidden fields at the moment of submission.
  3. The form posts to Salesforce as usual, so the attribution values travel with the rest of the lead data.
  4. Once stored on the record, the values become reportable dimensions you can group by channel, campaign or ad.

Nothing about the visitor's experience changes: they see the same form, and the extra data arrives silently. The work sits in preparing the fields and confirming they survive the trip into Salesforce.

Setup checklist

Work through these steps in order and test once at the end rather than after each change.

  • Confirm which form sends leads into Salesforce. If more than one does, list them all before starting.
  • Create the hidden fields on the form for each attribution value you intend to store.
  • Match those fields to the corresponding Salesforce lead fields so the values have somewhere to land.
  • Publish the form and submit a single test lead from a known source, such as a tagged paid search click.
  • Open the resulting lead and check that channel, campaign and landing-page values are populated rather than blank.
  • Build one report grouped by channel to confirm the field is usable as a reporting dimension.

If the test lead arrives with the hidden fields empty, the problem is almost always in the field mapping rather than the tracking itself.

What data you get, and where it belongs

Attribution data falls into two families, and it helps to treat them separately when you design Salesforce fields.

Channel data describes the route the visitor took. It records the channel itself, such as Paid Search, Paid Social or Organic Search, and then adds detail beneath that channel. For Paid Search, the deeper detail includes the campaign, ad group and keyword.

Landing page data describes the entry point. It records the first page the lead saw on your site, for example a specific blog article URL, together with the category that page belongs to, such as Blog.

A practical field layout keeps channel and landing page in separate groups so that reports can slice by either without mixing the two concepts. Channel answers "what brought them"; landing page answers "where did they first land".

A worked example

Imagine a visitor searches for guidance on licensing music, clicks a paid search ad and lands on a blog article about how to licence music. They read for a while, then complete your demo request form.

With hidden fields in place, the resulting Salesforce lead can carry the channel as Paid Search, the campaign and keyword behind the click, the landing page as that specific article URL, and the page category as Blog.

Later, when the lead becomes an opportunity, those same values remain attached to the record. A report grouped by channel then shows whether paid search leads convert, and a report grouped by page category shows whether blog entries behave differently from product pages. The example uses the blog-article pattern from the original documentation; substitute your own URLs and categories when you build the fields.

Which form setups are supported

Three form paths are covered, and the requirement is the same in each case: the form must be able to hold hidden fields.

Native Salesforce Web to Lead forms work directly. Add the hidden fields and the attribution values populate automatically.

Third-party form tools work provided they can accept hidden fields and pass submissions into Salesforce. The tool handles the capture; the hidden fields carry the attribution values through.

Custom-built forms work when a developer adds the hidden fields to the markup. Once present, the values fill in the same way as on a standard form.

If a form cannot hold hidden fields at all, this approach will not deliver attribution data to it, regardless of which of the three paths it resembles.

Two different failures look the same

A blank attribution field on a lead can mean one of two very different things, and separating them saves time.

The first case is a mapping failure. The form submitted correctly and the lead exists in Salesforce, but the hidden fields were never created, were named differently, or were not connected to the matching Salesforce fields. The fix is on the form and field-mapping side.

The second case is a delivery failure. The form submission never reached Salesforce at all, so there is no lead to inspect. The fix is in the form-to-Salesforce connection, not in the attribution fields.

A quick way to tell them apart: check whether the lead record exists. If it does and only the attribution fields are empty, you are looking at a mapping problem. If the lead is missing entirely, attribution is not the issue yet.

Turning the fields into reports

The value of the setup appears once the fields are used as report dimensions. Group leads by channel to see which routes produce the most leads, then group opportunities by the same field to see which routes produce revenue rather than volume alone. Campaign and ad-level fields let you narrow further when a channel looks promising.

Landing-page fields answer a different question: whether the page a visitor first saw predicts later conversion. Comparing page categories, such as blog against product pages, is often more stable than comparing individual URLs, which fragment quickly as content grows.

Getting started

Access to the tool is free, and paid plans are listed from a monthly starting price. Trial length and plan pricing are commercial terms that must be confirmed before publication: [trial length] and [starting price]. Any guarantee, support commitment or billing period also requires owner confirmation via [commercial terms]. This page does not state those terms; check the current pricing page or ask the vendor directly before relying on any figure or commitment. Treat any quoted number as provisional until you have it in writing from the provider, and note the date you checked, since trial and billing terms can change without notice. If a free tier is what matters to you, confirm separately what it includes and whether it expires, rather than assuming it matches the paid plans' feature set. Before signing up, confirm that at least one of your lead forms can hold hidden fields. That single check determines whether the setup described here is viable for your stack.

Attribution data families and their detail
Data familyTop-level valueDeeper detailExample
Channel dataChannel (e.g. Paid Search, Paid Social, Organic Search)Campaign, ad group, keyword for paid channelsPaid Search → campaign → ad group → keyword
Landing page dataFirst page the lead saw on your sitePage category (e.g. Blog)A blog article URL, categorised as Blog

Detail available beneath each channel varies by channel; the paid search breakdown is the example given in the original documentation.

Form compatibility check
Form typeRequirementWho does the work
Salesforce Web to LeadAdd hidden fields to the formMarketer or admin
Third-party form toolTool must accept hidden fields and pass leads to SalesforceMarketer, within the tool's settings
Custom-built formDeveloper adds hidden fields to the markupDeveloper

In every case the deciding factor is whether the form can hold hidden fields; forms without that capability are out of scope.

Frequently asked questions

Do visitors see the attribution fields on the form?

No. They are hidden fields, so the visitor completes the same visible form while the attribution values are written in behind the scenes.

Can I use this with a form tool that is not built by Salesforce?

Yes, as long as the third-party tool can hold hidden fields and sends its submissions into Salesforce. The hidden fields carry the attribution values through the same path as the rest of the lead data.

What is the difference between channel data and landing page data?

Channel data describes the route that brought the visitor, such as paid search, along with campaign, ad group and keyword detail. Landing page data describes the first page they saw and the category that page belongs to.

Why are my attribution fields empty on a lead that exists?

The submission reached Salesforce, so the issue is on the form side: the hidden fields may be missing, named inconsistently, or not mapped to the matching Salesforce fields.

Does this work if my forms are built by a developer?

Yes. Once hidden fields are added to the custom form markup, the attribution values populate them the same way as on a standard form.