Capture UTM Parameters in Happyforms and Attribute Every Lead
A Happyforms submission only tells you what a visitor typed. To learn which campaign produced that lead, the form also needs channel, drilldown and landing-page data written into hidden fields before submission. This guide explains the four-part setup, the field map to create, and how the captured values can be used in a CRM, email notification, spreadsheet or automation tool.
Why attribution fields matter
Marketing teams often know how many visitors arrived from a campaign but not how many leads or customers that campaign produced. Adding attribution fields to Happyforms closes that gap: each submission can carry the channel that brought the visitor to the site, more specific drilldown detail, and the page where the visit began.
Use this page as a setup checklist. First tag paid and bespoke campaigns, then create the hidden fields, then confirm that the attribution tool fills them, and finally check that the values arrive with the lead record.
Four-step setup
- Tag campaigns consistently
Add UTM parameters to paid social and search advertising, including LinkedIn, Instagram, Twitter, Facebook, Bing and Google. Apply the same discipline to sponsored newsletters, display placements and other bespoke activity so those leads are not left unattributed.
- Create hidden fields in Happyforms
Hidden fields are part of the form but are not shown to visitors. In Happyforms, drag a Text field into the form and add hide to Additional CSS Classes. Repeat the process for each field in the map below.
- Let the attribution tool populate the fields
A small site snippet examines how a visitor arrived, classifies the visit into a channel such as Paid Search, Paid Social or Organic Search, and stores that information in a browser cookie. When a form is submitted, the stored values are written into the hidden fields.
- Send the completed record onward
Happyforms captures the hidden values together with name, email, company and other answers. Those values can be included in email notifications, stored in a spreadsheet, passed to a CRM such as Salesforce, HubSpot or ActiveCampaign, or routed through an automation tool such as Zapier.
Hidden-field map and worked example
Create one hidden Text field for each of these names:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Landing Page
- Landing Page Group
Worked example: a visitor searches for a software brand, clicks a paid search ad, browses the site and requests a demo. The submitted record could show Channel = Paid Search, Channel Drilldown 1 = Google, Channel Drilldown 2 = Brand Campaign, Channel Drilldown 3 = the brand name, Landing Page = the brand landing-page URL, and Landing Page Group = Landing Pages.
Checklist before launch:
- Every hidden field uses the hide class and is not visible to visitors
- Field names match the names expected by the attribution tool
- A test submission from a tagged campaign populates all six fields
- A test submission from an organic visit is classified rather than left blank
- The values appear in the destination you actually use, such as CRM, email or spreadsheet
What a dedicated attribution tool adds
Attribution stored in a cookie survives navigation. If a visitor lands on the homepage from an ad, clicks Get A Quote and completes a form on a different page, the original campaign data is still available. Methods that read UTM values only from the form page URL would miss that lead and undercount the campaign.
Normalisation is the second advantage. Campaign tags created by different people or agencies may use google, google ads or adwords for the same activity. A dedicated attribution tool can tolerate capitalisation and naming inconsistencies and assign the lead to the correct channel, such as Paid Search, instead of splitting one source into several report rows.
Landing-page capture adds another reporting dimension. Recording the first page and its category makes it possible to compare leads from a blog as a whole or from individual posts, rather than reporting only on campaign channel.
Reporting questions the data can answer
Once the fields are populated, reporting can move beyond visitor counts. Useful questions include how many leads came from Facebook Ads, how many customers Google Ads generated, how much revenue LinkedIn Ads produced, and what return each paid campaign delivered. A practical way to evaluate any attribution tool is to run a small test: tag one campaign, submit a form from a different page than the landing page, and check whether the channel, drilldowns and landing page all arrive intact in the destination you use for reporting. Repeat with an organic visit to confirm it is classified rather than left blank, and with inconsistently tagged URLs to see whether they collapse into one channel or scatter across several rows. The same data also supports a broader view. Comparing paid and organic channels can show whether SEO, Organic Social, Direct or Referral activity deserves more investment. Before committing to a tool, review its current trial, pricing and signup terms directly with the provider, since these change over time.
Frequently asked questions
Does this only work for paid ads?
No. Attribution data can also cover Organic Search, Organic Social, Direct and Referral, so a lead without paid-ad UTM tags can still be classified by channel.
What if the visitor browses several pages before submitting?
Yes, if the attribution information is stored in a browser cookie when the visitor first arrives. The form page does not need to carry the original UTM URL.
Why not capture raw UTM values directly?
Raw values such as google, google ads and adwords can be normalised into one channel, such as Paid Search, instead of appearing as three separate sources in reports.
Can I see which page a lead first landed on?
The first landing page and its category can be recorded alongside channel data, making it possible to compare leads from individual articles or page groups.