Beta

Insights

How to track the source of every lead in your forms

A smartphone lying on a dark table.

A lead that arrives without its source can’t tell you which marketing to keep. Hidden form fields fix that, and take minutes to set up.

The problem

Someone fills in your contact form. The email lands in your inbox or your CRM with their name, email and message, and nothing about the ad, search or email that brought them. Weeks later, when that lead becomes a customer, nobody can say which campaign deserves the credit.

Hidden fields

The usual fix is to add hidden fields to the form, such as source, medium, campaign, term, click_id and landing_page, and have a script fill them in from the visitor’s history. The values are submitted with the form, so they travel wherever the form goes: your inbox, your CRM, a spreadsheet.

Two details make this much more useful:

  • Remember the first visit. Most people don’t fill in a form on their first visit. A script that only reads the current page’s link loses the campaign that found them. Keep both the first and the last touch.
  • Keep the click ID. A Google, Microsoft or Meta click ID lets you send the lead back to that platform as a conversion once it qualifies.

Step by step

  1. Add the tracking tag to every page of the site, not only the form page.
  2. Add hidden fields to each form, named after the values you want.
  3. Map the same fields to your CRM, so they land on the lead record.
  4. Submit a test from a tagged link and check every value arrived.
  5. Decide what a qualified lead is, and send those back to your ad platforms as conversions.

In Metric Sensei

The Attribution tag fills any field named or classed ms_source, ms_campaign, ms_first_touch_source and so on, on any form. On WordPress, the Metric Sensei plugin also saves submissions from the popular form plugins with their source. Form contents are never read by the tag, only counted. See Lead generation and local services.

All your metrics, one place, with AI.

Connect your accounts once, then build dashboards, ask the AI assistant, watch your network and see what brings in customers.