Track Facebook Ads in Freshsales CRM
If you cannot connect a Freshsales lead back to the Facebook ad that brought the person in, you are left guessing which campaigns deserve more budget. This guide explains a four-step setup that passes Facebook Ads UTM data through your website forms and into Freshsales CRM, then shows the reports that become possible.
What the tracking snippet does
Attribution Analytics is a small piece of code added to your website. When a visitor arrives, it reviews technical signals about how they got there, similar to the data Google Analytics examines. It then sorts the visit into a marketing channel such as Paid Social, Paid Search or Organic Search and stores that classification in a cookie in the visitor's browser.
When the visitor submits a form, Attribution Analytics writes the stored data into hidden fields on that form. Those fields travel with the rest of the submission into whatever systems are connected to your forms, including Freshsales CRM, email marketing tools, billing platforms and analytics tools. The result is a lead record that carries its original channel context.
Questions the data can answer
Once channel data reaches Freshsales, you can build reports that answer practical questions:
- How many leads came from Facebook Ads, and how does that compare with SEO, Google Ads and other channels?
- How many opportunities were created from Facebook Ads?
- Which campaigns produced the most opportunities?
- How many closed-won deals or customers came from Facebook Ads, and how does the close rate compare with other sources?
- How much revenue came from Facebook Ads, and what is the return relative to ad spend?
Pre-flight checklist before you start
A few checks now save debugging later:
- Confirm you can edit both your website code and your lead capture forms.
- Decide which forms should carry attribution data; every form that creates a Freshsales lead needs the hidden fields.
- Agree on a UTM naming convention with whoever builds the ads.
- Check that your form tool supports hidden fields and that those fields are mapped into Freshsales.
- Test one ad URL end to end before scaling spend.
Step 1: Install the tracking code and add hidden fields
After signing up for Attribution Analytics, you receive a code snippet to install on your site. You can usually add it through your site settings or through a tag manager such as Google Tag Manager. {{OWNER_TRIAL_DURATION}} and {{OWNER_FREE_TIER_AVAILABLE}} describe the current offer.
Next, add hidden fields to the lead capture forms on your site. The fields are:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Channel Drilldown 4
Many form builders make this straightforward. You can often drag a hidden field type into the form or convert a standard field to hidden in its settings. Gravity Forms, Typeform and Jotform are among the tools that support this.
Step 2: Add UTM parameters to Facebook Ads
UTM parameters are extra pieces of text appended to the URL you send people to from a campaign. For example, if the destination page is https://roipaths.com/integrations/freshsales, a tracked version might look like this:
https://roipaths.com/integrations/freshsales?utm_medium=paidsocial&utm_source=facebook&utm_campaign=brand-campaign
You can choose your own structure, but a common convention for Facebook Ads is:
- UTM Medium = Paid social
- UTM Source = Facebook
- UTM Campaign = The name of your campaign
- UTM Term = The name of the ad set the ad belongs to
- UTM Content = The specific ad
Free online tools can help you build these URLs consistently.
Step 3: Let the tracking code fill the hidden fields
When someone visits your site from a Facebook Ad, Attribution Analytics captures the UTM parameters and keeps them in a cookie in that visitor's browser. The data is retained regardless of which pages the person browses afterward.
When the visitor submits a form, such as a contact or quote request form, Attribution Analytics places the Facebook Ads data into the hidden fields. That data is captured alongside the lead's name, email and other details.
As an illustration, imagine a marketer at Freshsales running ads for the Freshsales CRM. A person clicks a Facebook Ad, browses the site and submits a form. Depending on the UTM parameters used, Attribution Analytics might fill the hidden fields like this:
- Channel = Paid Social
- Channel Drilldown 1 = Facebook
- Channel Drilldown 2 = Brand Campaign
- Channel Drilldown 3 = North America Ad Group
- Channel Drilldown 4 = Green Ad
Attribution Analytics also captures the visitor's landing page, such as freshsales.com/features/contact-management, and the landing page group, such as /features.
Step 4: Send the data into Freshsales
The Facebook Ads data derived from the UTM parameters, together with the lead's name, phone, email and other details, is passed to Freshsales CRM.
With the UTM parameters inside Freshsales, you can build reports using Freshsales' native reporting tools. If you use a BI tool such as Looker or Tableau, you can run more detailed reports there as well.
Field and control map
The table below shows how a single Facebook ad click moves through the setup. Use it to check that each control is configured before you test.
| Stage | Control or field | Example value | What to check |
|---|---|---|---|
| Ad URL | utm_medium | paidsocial | Matches your channel convention |
| Ad URL | utm_source | Consistent spelling across campaigns | |
| Ad URL | utm_campaign | brand-campaign | Matches the campaign name in Ads Manager |
| Ad URL | utm_term | north-america-ad-group | Matches the ad set name |
| Ad URL | utm_content | green-ad | Matches the specific ad |
| Form | Channel | Paid Social | Hidden field present and mapped |
| Form | Channel Drilldown 1 | Hidden field present and mapped | |
| Form | Channel Drilldown 2 | Brand Campaign | Hidden field present and mapped |
| Form | Channel Drilldown 3 | North America Ad Group | Hidden field present and mapped |
| Form | Channel Drilldown 4 | Green Ad | Hidden field present and mapped |
| Freshsales | Lead record | Name, email, channel fields | Fields visible in the lead layout |
Why use this approach
You could pass Facebook Ads data into Freshsales CRM by other means. Here is what this setup adds:
- A complete channel picture. Visitors who arrive through Direct, Referral, Organic Social or Organic Search are classified too, so every lead and customer has a source, not only the ones who clicked a Facebook Ad.
- Attribution that survives the session. The UTM values sit in a browser cookie, so a form submitted several pages later still carries the original campaign data, which keeps lead and customer counts closer to reality.
- Tolerance for messy UTMs. When one campaign is tagged utm_source=facebook and another utm_source=facebook.com, both leads still land in the Paid Social channel.
- Landing page context. The landing page URL and its group are recorded alongside the ad data, giving you a way to judge how individual pages and content sections perform.
Three reports to run
After the four steps, Freshsales can support reports like these:
- Leads by channel. This shows lead counts broken down by channel, letting you compare Facebook Ads with other sources and make more strategic budget decisions. This report depends on capturing the source of all leads, not only Facebook Ads leads.
- Customers by campaign. This shows new customers per month broken down by the campaign they came from. It helps identify which campaigns generate the most customers and where to focus optimization and testing.
- Revenue by campaign. This shows revenue generated each month broken down by campaign. It helps assess overall return on Facebook Ads. For example, if a chart shows $65,000 in new revenue from Facebook Ads in August and the ad spend was lower than that, the campaign is producing a positive return. You can also break the report down by individual campaign to decide where to invest more and where to stop.
Missing UTMs versus missing hidden fields
Two failures look similar in Freshsales but have different causes.
If the Channel and Channel Drilldown fields are empty on every lead, the hidden fields are probably missing from the form or not mapped into Freshsales. Check the form builder first, then the field mapping.
If the hidden fields exist but show generic or unexpected values, the ad URLs may be missing UTM parameters or using inconsistent names. Check the final URL in Ads Manager and compare it with your naming convention.
A useful test is to submit a form from a tracked ad URL and inspect the resulting Freshsales lead. If the fields are present but blank, the issue is upstream in the URL. If the fields are absent from the lead layout, the issue is in the form or CRM mapping.
Getting started
If knowing which Facebook Ads produce leads, opportunities, customers and revenue would change how you allocate budget, this setup gives you the data to make those decisions. It captures UTM parameters behind your Facebook campaigns and sends them to Freshsales, where you can report on campaigns and ad groups. It also records leads from other channels, so you can see the full picture of where your business comes from.
{{OWNER_TRIAL_DURATION}} and {{OWNER_FREE_TIER_AVAILABLE}} describe the current offer. {{OWNER_CONTACT_URL}} is the place to start.
Frequently asked questions
Do I need to add UTM parameters to every Facebook Ad?
Yes, if you want each ad's traffic to be distinguishable in Freshsales. The tracking code reads the UTM parameters on the ad URL and stores them in the visitor's browser cookie. Without UTMs, the lead may still be classified by other signals, but you will not have campaign or ad-level detail.
What happens if a visitor submits a form on a different page from the landing page?
The tracking code keeps the UTM parameters in a cookie, so the data is sent through regardless of which page the form is submitted on. This is one of the reasons the approach is more accurate than methods that only read the URL at the moment of submission.
Can I use this setup with form builders other than Gravity Forms, Typeform or Jotform?
The setup relies on hidden fields, which many form builders support. If your form tool allows hidden fields and can pass them into Freshsales, the same four-step process applies. Check your form tool's documentation for how to add hidden fields.
Does this only track Facebook Ads?
No. It also captures leads arriving through Direct, Referral, Organic Social and Organic Search, so you can compare Facebook Ads with other channels and see where all leads and customers come from.