Track Facebook Ads in Agile CRM: UTMs, Hidden Fields and Reports
Without campaign-level attribution inside Agile CRM, it is hard to know whether Facebook spend is producing leads, opportunities, closed deals or revenue — or simply consuming budget. The workflow below connects website visits to CRM records so each contact carries the channel, campaign, ad set, ad and landing page that brought them in.
How the attribution flow works
An attribution snippet on the website records how each visitor arrived, groups that visit into a marketing channel such as Paid Social, Paid Search or Organic Search, and stores the result in a browser cookie. When a lead form is submitted, the stored values are copied into hidden fields on that form and travel with the contact's name, email and phone into connected systems, including Agile CRM. Once the data is in the CRM, native reporting — or a connected business-intelligence tool — can break results down by channel, campaign, ad set, ad and landing page.
Setup checklist
Work through these steps in order. Skipping the hidden fields or the UTM tagging breaks the chain between an ad click and a CRM record.
Step 1 — Install the code and add hidden fields
Install the attribution code on the website, then add these hidden fields to every lead-capture form: Channel; Channel Drilldown 1; Channel Drilldown 2; Channel Drilldown 3; Channel Drilldown 4; Landing Page; Landing Page Group. Most form builders let you add a hidden field type or hide an existing field in its settings. Tag each Facebook campaign URL with UTM parameters — extra text appended to the destination URL. A consistent convention is: UTM Medium = Paid Social; UTM Source = Facebook; UTM Campaign = campaign name; UTM Term = ad set name; UTM Content = specific ad. For example, a destination URL ending in ?utm_medium=paidsocial&utm_source=facebook&utm_campaign=brand-campaign carries the campaign through to the CRM record.
Step 2 — Capture, store and pass the data
When a visitor arrives from a Facebook ad, the UTM values are saved to a cookie so they survive browsing across the site. On form submission they are written into the hidden fields alongside the lead's details. A worked example: Channel = Paid Social; Channel Drilldown 1 = Facebook; Channel Drilldown 2 = Brand Campaign; Channel Drilldown 3 = North America Ad Group; Channel Drilldown 4 = Green Ad. The landing page and its group — for example a features page and the /features group — are captured at the same time, showing which entry pages convert.
Why this approach is useful
Beyond Facebook, the same mechanism records Organic Social, Organic Search, Direct and Referral visits, giving a complete picture of lead origins. Cookie storage means campaign data is retained across pages, improving accuracy. Normalisation handles inconsistent UTM naming — for instance facebook versus facebook.com — by assigning both to Paid Social. Landing page and landing page group data also reveal how content sections perform.
Three reports to build
Build three core reports in Agile CRM. First, leads by channel, to compare Facebook against Google Ads, SEO and other sources and guide budget allocation. Second, customers by campaign, showing new customers per month per campaign to identify which campaigns produce the most customers. Third, revenue by campaign, showing new revenue per month per campaign so return on ad spend can be judged — for example, if a month produces $65,000 in new revenue from Facebook and spend was lower, the channel is returning more than it costs, and individual campaigns can be scaled or stopped accordingly.
Before you start
Before you publish, settle the commercial terms for whichever attribution tool you use — for example, whether a trial is offered, how long it lasts, what it includes and what the paid plan costs once it ends. Treat those details as a decision to confirm with the vendor rather than an assumption. Then verify that every form carries the seven hidden fields, that UTM naming is consistent across campaigns, and that a test submission creates an Agile CRM record with the expected channel, drilldown, landing page and landing page group values.
| UTM parameter | Recommended value | CRM field it populates |
|---|---|---|
| utm_medium | Paid Social | Channel |
| utm_source | Channel Drilldown 1 | |
| utm_campaign | Campaign name | Channel Drilldown 2 |
| utm_term | Ad set name | Channel Drilldown 3 |
| utm_content | Specific ad | Channel Drilldown 4 |
Values are a recommended convention; the source allows any consistent structure.
Frequently asked questions
What is needed to start tracking Facebook Ads in Agile CRM?
Add the site code, add the seven hidden fields listed above to each lead form, and tag every Facebook campaign URL with consistent UTM parameters. The attribution data is then stored in a browser cookie, written into the form on submission, and passed into Agile CRM with the contact details.
Does this only work for Facebook traffic?
Yes. The same setup also records visits from Organic Social, Organic Search, Direct and Referral traffic, so reports can compare Facebook against other channels rather than showing Facebook in isolation.
What if a visitor does not submit a form on the first page they land on?
No. Because values are kept in a cookie, the original campaign data is still available even if the visitor browses several pages before submitting a form.
What if UTM naming is inconsistent across campaigns?
Inconsistent values such as facebook and facebook.com for the same source are normalised to the same Paid Social channel, reducing split reporting caused by naming variations.