Capture Facebook Ads Data in Formstack
If you run Facebook Ads, you can see clicks and impressions inside the ads platform. What you cannot see there is how many of those clicks turned into Formstack submissions, which campaign produced them, or which network — Facebook, Instagram or Messenger — did the heavy lifting. This guide shows a four-step setup that writes Facebook Ads dimensions into hidden Formstack fields so each lead arrives with its source attached. The setup uses a cookie-based attribution tool that reads UTM parameters and writes the derived values into hidden fields at submission time.
Why capture ad data at the form level
Facebook Ads can generate leads, but without a record of which campaign or ad set produced each one, budget decisions rest on guesswork. Capturing the data at the moment of submission gives you a per-lead record you can join to CRM, billing or spreadsheet data later. The setup described here uses a cookie-based attribution tool that reads UTM parameters from the visitor's URL, stores them in a browser cookie, and writes the derived values into hidden fields when a Formstack form is submitted. The same data can then be forwarded to a CRM, a spreadsheet, an email notification or a billing platform.
Step 1 — Tag every Facebook Ad with UTM parameters
UTM parameters are tags appended to a URL that identify the traffic source. For a Facebook campaign, a consistent pattern keeps reporting clean. The example below shows a tagged URL for a Formstack integration page:
https://roipaths.com/integrations/formstack?utm_medium=paidsocial&utm_source=facebook&utm_campaign=brand-campaign
A practical convention for Facebook Ads is:
- utm_medium = paidsocial
- utm_source = facebook, instagram or the relevant network
- utm_campaign = the campaign name
- utm_term = the ad set name
- utm_content = the specific ad
Free UTM builder tools exist if you prefer not to assemble URLs by hand. The important discipline is consistency: pick one spelling for each value and reuse it across ads so reports do not fragment.
Step 2 — Install the tracking snippet on the website
The tool is installed by adding a snippet of code to the site, either directly or through a tag manager such as Google Tag Manager. Setup instructions are available in the tool's help centre. Any trial period ({{OWNER_TRIAL_LENGTH}}) and plan terms ({{OWNER_PRICING_TERMS}}) are set by the tool vendor and should be confirmed on its signup page before relying on them.
Step 4 — Let the tool write the values on submission
When a visitor arrives from a Facebook Ad, the tool reads the UTM parameters and stores them in a cookie in the visitor's browser. The cookie persists as the visitor moves between pages, so the data survives a journey that starts on a landing page and ends on a separate form page. On submission, the tool writes the derived Facebook Ads values into the hidden fields, and Formstack saves them alongside the lead's name, email and other answers.
Hidden field map
The table below pairs each hidden field with the Facebook Ads dimension it records. The first field identifies the broader channel; the drilldown fields narrow down to the specific ad.
Where the captured data can go
Once the values are stored in Formstack, they can be forwarded to other systems using Formstack's built-in integrations or a connector such as Zapier. Common destinations include:
- CRM platforms such as Zoho CRM, Pipedrive or Salesforce, where reports can show lead volume, conversion rate and revenue by Facebook Ads source.
- Spreadsheets in Google Sheets or Excel, which support charts and basic analysis; analytics tools such as Google Data Studio or Microsoft Power BI can connect to the sheet for deeper reporting.
- Lead notification emails, so the source of each lead is visible in the inbox without opening a CRM.
- Billing platforms such as Stripe or PayPal, where revenue reports can be segmented by ad source.
What distinguishes this approach from plain UTM capture
Several methods can record UTM parameters in a form. The points below explain where the cookie-based approach differs and when that difference matters.
- Broader channel coverage. Beyond Facebook Ads dimensions, the tool also records Paid Search, Organic Search, Organic Social, Referral and Direct, so reports can compare channels rather than isolating one.
- Persistence across pages. A simple UTM reader only works when the parameters are present on the page where the form is submitted. If the visitor lands on a homepage and later completes a form on a different page, the parameters are lost. A cookie-based approach keeps the values available.
- Tolerant matching. Inconsistent spellings such as utm_source=facebook versus utm_source=facebook.com can still be grouped into the correct channel, which reduces manual cleanup.
- Landing page context. The tool also records the landing page URL and landing page group, so reports can show which sections of the site — a blog, for example — produce leads and customers.
Three reports worth building
If the captured data is forwarded to a CRM or spreadsheet, the following reports become possible.
- Leads by channel. A monthly count of leads broken down by channel shows how Facebook Ads compare with other sources and supports budget allocation decisions.
- Leads by network. If ads run across Facebook, Instagram and Messenger, a network breakdown shows which platform produces the most leads and where to increase spend.
- Leads by campaign. A monthly view of leads per campaign separates campaigns that generate leads from those that only generate clicks.
Setup checklist
Before considering the setup complete, confirm each item below.
- Every active Facebook Ad has a UTM-tagged destination URL with consistent medium, source, campaign, term and content values.
- The Attribution Analytics snippet is present on every page that hosts a Formstack form, or is loaded through the tag manager.
- Each Formstack form that should record ad data contains the seven hidden fields listed in the field map.
- A test submission from a tagged URL shows the expected values in the Formstack submission record.
- A test submission that begins on one page and ends on another still carries the values, confirming the cookie is working.
- The downstream destination — CRM, spreadsheet, email or billing platform — receives the fields and maps them to the correct properties.
Summary
Recording Facebook Ads data in Formstack comes down to four moves: tag the ads with UTM parameters, install the tracking snippet, add the hidden fields, and let the tool populate them on submission. The payoff is a per-lead record of network, campaign, ad set and ad that can be joined to CRM, billing or spreadsheet data. Trial length ({{OWNER_TRIAL_LENGTH}}) and pricing terms ({{OWNER_PRICING_TERMS}}) are set by the tool vendor and should be confirmed on the vendor's signup page.
| Hidden field | Facebook Ads dimension recorded |
|---|---|
| Channel | Broad channel, e.g. Paid Social |
| Channel Drilldown 1 | Network, e.g. Facebook or Instagram |
| Channel Drilldown 2 | Campaign name |
| Channel Drilldown 3 | Ad set name |
| Channel Drilldown 4 | Specific ad |
| Landing Page | URL of the landing page |
| Landing Page Group | Section of the site, e.g. /blog |
Field names are the exact labels marketing attribution software expects to populate; the dimension mapping reflects the UTM convention described in the setup steps.
Frequently asked questions
Why do UTM parameters sometimes disappear before the form is submitted?
A simple UTM reader only sees parameters present in the URL of the page where the form is submitted. If a visitor lands on a tagged page and later completes a form on a different page, the parameters are no longer in the URL and the source is lost. A cookie-based approach stores the values in the browser so they remain available on the form page.
What happens if some ads use utm_source=facebook and others use utm_source=facebook.com?
The tool is designed to detect inconsistencies like this and still group the leads into the correct channel, in this case Paid Social. That reduces manual cleanup before reporting.
Can the same setup record leads from channels other than Facebook Ads?
Yes. The tool also records Paid Search, Organic Search, Organic Social, Referral and Direct, so reports can show all lead sources rather than only Facebook Ads.
Does the setup record which page a visitor landed on?
Yes. The tool captures the landing page URL and the landing page group alongside the ad data, so reports can show which sections of the site — such as a blog — generate leads and customers.