How to track Facebook ads data in Salesforce in 4 steps

✔️Capture Facebook ads data on a lead level ✔️ Store Facebook ads data in Salesforce
Track Facebook ads data in Salesforce

What's on this page:

Track the source of your leads (free trial)

You run lead generation ads on Facebook and send the leads to Salesforce, but you cannot track which specific Facebook ad generated each lead. So when a lead becomes a customer, you don’t know which ad drove the sale.

The lack of data makes it impossible for you to optimize your Facebook ads, as you’re spending on multiple ads at once without knowing which one is generating revenue.

Leadsources addresses this issue by linking each lead to its corresponding Facebook ad, including the campaign, ad set, audience, and ad.

This article will teach you how to assign each lead to a specific Facebook ad, campaign, ad set, and audience.

Let’s get started!

Capture Facebook ads in Salesforce

Step 1: Add Leadsources in the head tag of your website

Sign up to Leadsources.io, and benefit from our 14-day free trial.

Add the Leadsources tracking code in the head tag of your site – follow this easy step-by-step guide.

Step 2: Add the UTM parameters to your Facebook ads campaigns

Add the UTM parameters you wish to monitor into your Facebook campaigns.

For instance, you can monitor the campaign, ad set, audience, and ad by utilizing these UTM parameters:

  • UTM_source=facebook
  • UTM_campaign=campaign-name
  • UTM_term=ad-set-name
  • UTM_content=ad-name

Leadsources collects all lead source data, including channel, landing page, and landing page subfolder, even in the absence of UTM parameters, offering comprehensive insights at the lead level.

Step 3: Add the hidden fields in your form

To enable Leadsources to store lead source data, you must create hidden fields in the form on your landing page.

When a new lead submits your form, Leadsources automatically populates the hidden fields with Facebook ads data.

Consult our comprehensive guide on adding hidden fields to your form to finalize the setup.

Step 4: Capture the Facebook ads data in Salesforce

When users click on your Facebook ads and arrive at your page, Leadsources captures the Facebook ads data, including campaign, ad, ad set, and audience.

Leadsources automatically fills the hidden fields of your form with Facebook ads data.

After submitting the form, Facebook ads data, along with your leads, can be automatically transferred to Salesforce by connecting your form to it.

How does Leadsources work?

By placing the Leadsources tracking code in the head tag of your site, it gathers Facebook ads data—such as campaign, ad set, audience, and ad—whenever a visitor arrives on your site.

After being captured, the Facebook ads data is saved in the hidden fields of your form, and this information can be sent to your Salesforce along with the lead.

Leadsources gathers the following information from visitors:

  • Channel
  • Source
  • Campaign
  • Content
  • Term
  • Landing page
  • Landing page subfolder

Leadsources monitors this lead source data even when UTM parameters are absent.

There are situations where UTM parameters cannot be used:

  • Google Search
  • Instagram bio link
  • Social media posts
  • Etc.

This poses a problem for many lead source tracking tools, as they depend solely on UTM parameters for lead source data; however, Leadsources continues to track some lead source data even without UTM parameters:

  • Channel
  • Source
  • Landing page
  • Landing page subfolder

As a result, Leadsources offers lead data tracking across all channels, setting it apart from other tools:

  • Organic Search
  • Paid Search
  • Organic Social
  • Paid Social
  • Referral
  • Affiliate
  • Email
  • Display Advertising
  • Direct Traffic

Leadsources automatically organizes your traffic by channel, resulting in a tidy dataset.

Using Leadsources, you can establish strong lead source tracking across all channels in one central location.

How to run performance reports

With Facebook ads data now tracked in Salesforce, you can generate various performance reports, including:

  • Leads by channel
  • Leads by campaign
  • Leads by ad set
  • Leads by audience
  • Leads by ad
  • Leads by landing page
  • Leads by landing page subfolder

This allows you to assess and optimize your Facebook ads budget with greater precision.

Let’s explore the various types of reports you can create.

Lead performance reports

These reports illustrate the number of leads generated by:

  • Channel
  • Campaign
  • Ad set
  • Audience
  • Ad
  • Landing page
  • Landing page subfolder

Example #1

Export data from different channels such as SEO, PPC, and email to generate a report titled “Leads by Channel.”

Leads by channel

Example #2

Once you identify the best-performing channel (e.g., Facebook ads), you can focus on it to see the number of leads generated by each campaign.

Leads by campaign

Example #3

By identifying the top lead-generating campaign, you can determine the specific audience, ad set, or ad responsible for these leads.

Leads by keyword

Sales performance report

Identifying which ads and keywords generate the most leads is beneficial, but do they contribute to your revenue as well?

Transferring your form data to Salesforce makes it easier to create complete sales performance reports.

Example:

ChannelsSearch PaidSocial Paid
Leads5075
Sales56
Average order value$150$100
Revenue$750$600

Upon reviewing the performance of your Google and Facebook ads, you found that Social Paid ads generated more leads than Search Paid ads.

After several weeks of analysis, you notice that the Search Paid channel produced more revenue with fewer leads compared to the Social Paid channel, leading you to decide to increase the budget for Search Paid campaigns.