How to Capture Facebook Ads Data in Avada Forms
If you run ads on Facebook and collect leads through Avada Forms, the form entry is only half the story. The other half is knowing which campaign, ad set and ad brought that person to your site. This guide shows how to connect those pieces so each submission carries its source data alongside the lead's own details.
What you need before you start
You need three things working together: a Facebook ad whose destination URL includes UTM parameters, a small attribution script installed on your site, and Avada forms that contain the hidden fields the script will fill. The script reads the UTM values when a visitor arrives, keeps them in a cookie in the visitor's browser, and writes them into the hidden fields at submission time. That means the data survives a visitor browsing other pages before filling in a form.
Step 1: Put UTM parameters on your Facebook Ads
UTM parameters are short text tags appended to the URL you send ad traffic to. They tell your analytics and attribution tools which campaign, ad set and ad produced the click. The source example uses this URL:
https://roipaths.com/integrations/avada-forms?utm_medium=paidsocial&utm_source=facebook&utm_campaign=brand-campaign
A common convention for Facebook Ads is:
- UTM Medium: Paid social
- UTM Source: Facebook
- UTM Campaign: the campaign name
- UTM Term: the ad set name
- UTM Content: the specific ad
You can choose your own structure, but keeping it consistent makes later reporting far easier.
Step 2: Install the attribution script
The attribution script is a small piece of code placed on your website. On each visit it examines the same kinds of technical signals that analytics tools use to determine where the visitor came from. When the visitor submits a form, the script autofills the attribution values into the hidden fields you have added. The lead's own entries, such as first name, surname, email and company name, are captured by Avada Forms at the same time. The source notes that a free 14-day trial provides the code and that a full installation guide is available.
Step 3: Add the hidden fields to your Avada forms
Add these hidden fields to each lead-capture form, such as a quote request or contact form:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Landing Page
- Landing Page Group
Avada Forms makes adding hidden fields straightforward. The source points to a separate walkthrough for the exact steps.
Step 4: Let the script fill the fields at submission
When a visitor arrives from a Facebook Ad, the script collects the UTM parameters and stores them in a cookie in the browser. If the visitor moves to other pages before completing a form, the values are still available. On submission, the script writes the Facebook Ads data into the hidden fields, and Avada Forms saves it with the lead's personal details.
A field map for the Facebook Ads data
Use this map to check that each hidden field is receiving the value you expect. The exact values depend on how you structure your UTM parameters, but the pattern below follows the source's recommended convention.
This mapping is an illustrative convention, not a fixed contract: the source lists the six hidden fields and the UTM convention separately, and only three Channel Drilldown fields exist. Under this convention, the specific ad (UTM Content) is not mapped to a drilldown field. If a field is empty on a submission, check the corresponding UTM parameter first, then confirm the hidden field name matches exactly.
A worked example
Suppose a visitor clicks a Facebook ad that points to https://roipaths.com/integrations/avada-forms?utm_medium=paidsocial&utm_source=facebook&utm_campaign=brand-campaign. The script records the medium, source and campaign. If the visitor then reads two other pages and submits a contact form, the hidden fields still carry the original values. The form entry shows the lead's name and email next to the channel and campaign data, so you can see which ad produced the enquiry without asking the visitor.
Where the data can go next
Once the data is saved in Avada Forms, you have several options:
- View it in the WordPress dashboard under Form Entries in the Avada section.
- Send it to a spreadsheet through a tool such as FlowMattic, then analyse it or build reports in a tool like Google Data Studio.
- Include it in new-lead notification emails so you can see the source in real time.
- Send it to a CRM such as Salesforce, Pipedrive or HubSpot and report on customers and revenue by campaign.
Three reports worth running
Once the data reaches a CRM or reporting tool, three report shapes are especially useful for judging Facebook Ads performance.
- Leads by channel. Compare Paid Search, Paid Social and other channels month by month. This helps you decide where to put budget.
- Leads by network. If you advertise across Facebook's networks, such as Messenger, Instagram and WhatsApp, see which one produces the most leads.
- Leads by campaign. Drill into individual campaigns to see which ones generate leads, then shift spend toward the ones that work.
Why a cookie-based attribution script helps
A script that stores UTM values in a cookie solves two common problems. First, it keeps the original source even when the visitor completes a form on a different page. Second, it can normalise inconsistent UTM usage, such as utm_source=facebook in one campaign and utm_source=facebook.com in another, and still assign the lead to the correct channel. The same script can also capture the initial landing page and its group, which gives you a second dimension for analysis.
Checklist before you launch
- Every Facebook ad URL includes utm_source, utm_medium and utm_campaign at minimum.
- The attribution script is installed on every page where a form appears.
- Each Avada form contains all six hidden fields with names that match the script's expected field names.
- A test submission from a tagged URL shows values in Form Entries.
- A test submission from an untagged visit is attributed to the appropriate non-paid channel (such as Direct or Organic) per the script's channel logic.
- The CRM or spreadsheet receives the hidden-field values in the right columns.
| Hidden field | What it should contain |
|---|---|
| Channel | The broad channel, such as Paid Social |
| Channel Drilldown 1 | The source, such as Facebook |
| Channel Drilldown 2 | The campaign name |
| Channel Drilldown 3 | The third drilldown value, such as the ad set name (UTM Term) |
| Landing Page | The first page the visitor landed on |
| Landing Page Group | The group that page belongs to, such as /blog |
Frequently asked questions
Do I need to add UTM parameters if I only run Facebook Ads?
Yes. The attribution script relies on UTM parameters to identify the campaign, ad set and ad. Without them, the form submission will not carry Facebook campaign, ad set or ad detail, though the script still records other channel and landing-page attribution.
What happens if a visitor submits a form on a different page from the ad landing page?
The script stores the UTM values in a cookie in the visitor's browser, so the original source data is still written into the hidden fields when the form is submitted later.
Can I use different UTM naming conventions across campaigns?
The script is designed to handle inconsistencies such as utm_source=facebook and utm_source=facebook.com and still assign the lead to the correct channel. Keeping a consistent convention is still recommended for cleaner reporting.
Where can I see the captured data inside WordPress?
Open the Avada section of the WordPress dashboard and go to Form Entries. Each entry shows the hidden-field values alongside the details the lead entered.
How do I get the data into my CRM?
Use a connector or integration to send the Avada Forms entry, including the hidden fields, to your CRM. The source names Salesforce, Pipedrive and HubSpot as examples of destinations for campaign and revenue reporting.