How to capture Facebook Ads data in WordPress forms

See which campaigns, ad sets & ads are generating your leads by capturing Facebook Ads data with each submission of your WordPress forms

Wordpress Facebook Ads

Do you wish you could track how many leads & customers you get from your Facebook Ads?

Imagine if you could see the exact source of every lead you got from your website, including the exact campaign, ad set, and ad they clicked.

If you could do that, you'd be able to see which campaigns are working for you and which ones aren't.

In this article, we'll show you how to do exactly that. You'll learn how to use Attributer to track the source of all your leads (including those from Facebook Ads) in WordPress forms and send the data to your CRM and other tools.

4 simple steps to track your Facebook Ads in WordPress forms

Capturing Facebook Ads data in WordPress forms is easy with Attributer. Here’s how:

1. Add UTM parameters to your Facebook Ads

Facebook Ad with UTMs

If you've never heard of UTM parameters before, they are basically just extra bits of text that you add to the end of the URL you are sending people to from your campaigns.

So if you were running a Facebook Ad and sending someone to attributer.io/integrations/wordpress then your final URL (with UTM parameters) you put behind your ad might look a bit like this:

attributer.io/integrations/wordpress?utm_medium=paidsocial&utm_source=facebook&utm_campaign=brand-campaign

You can put whatever information you want to capture about leads in your UTM parameters, but the general best practice for Facebook Ads is something like:

  • 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

If you're a bit unsure about creating UTM parameters, there are plenty of free tools around the web that make it super easy to create them.

2. Install Attributer on your website

Add Attributer Code to Site Mobile

Attributer is essentially a bit of code that you place on your website.

When someone visits your site (like from your Facebook Ads for instance), it looks at how they got there and categories them into a series of channels (the same one's you see in Google Analytics, like Paid Social, Paid Search, Organic Search, Organic Social, etc).

And then when that visitor completes a form on your site, Attributer writes information on where they came from into hidden fields on your WordPress forms and it is captured by your form builder.

Installing Attributer on your WordPress site is simple. You can sign up for a 14-day free trial here and follow these step-by-step instructions (with screenshots) here.

3. Add hidden fields to your forms

Step 2

Now you need to add a series of hidden fields to your forms. The fields you need to add are:

  • Channel
  • Channel Drilldown 1
  • Channel Drilldown 2
  • Channel Drilldown 3
  • Landing Page
  • Landing Page Group

Fortunately, most WordPress form tools (including Gravity Forms, Contact Form 7, WPForms, and more) make it super easy to add hidden fields, and full instructions for all the different form builders can be found here. 

4. Attributer writes the Facebook Ads data into the hidden fields and it’s captured by your form tool

Step 2 (1)

Now that everything is setup, Attributer will start to track where your website visitors are coming from.

For example, if someone came from one of your Facebook Ads, it would capture the UTM parameters you put behind your Facebook Ads and store them in a cookie in the visitor's browser.

Then when they eventually complete a form on your website (like your ‘Contact Us’ or Request A Quote’ form), Attributer will write the Facebook Ads data (derived from the UTM parameters) into the hidden fields on the form and it will be captured alongside the lead’s name, email, etc upon form submission.

What you can do with the data

Once you've got Attributer set up and the Facebook Ads data is being captured alongside each lead, there are a number of things you can do with it:

  • Send it to your CRM - If you are using a CRM (like Salesforce, Hubspot, Pipedrive, and more), you can send the data into there and use it to run reports that show you how many leads you got from your Facebook Ads, how many of those turned into customers, how much revenue was generated, etc.
  • Send it to a spreadsheet - If you're not using a CRM but still want to build charts and graphs, you can download your leads as a CSV from your form builder or automatically send them to a Google Sheet using tools like Zapier. You can then build charts & graphs in the spreadsheet, or connect tools like Google Data Studio or Microsoft Power BI to build advanced reports & dashboards.
  • See it in your email notifications - If you simply respond to new leads when you get the notification in your inbox, you can append the Facebook Ads data to the lead notification email you receive from your form tool so you can see exactly where each lead is coming from, right from your inbox.

Why use Attributer

Attributer is the best way to capture Facebook Ads data in WordPress forms. Here's why:

Captures other attribution information

Attributer doesn't just provide information on leads that come from your Facebook Ads. It provides attribution on ALL your leads (including those that come to your site from Paid Search, Organic Search, Organic Social & more)

This means you can track the performance of your other marketing efforts as well, such as your Google Ads, your SEO efforts, etc.

Remembers the data

Because Attributer stores the UTM parameters in a cookie in the user’s browser, it will remember them (and pass them through with each form submission) even if the person leaves the site and comes back days later.

Cleans the data

Attributer was built to expect inconsistencies in UTM usage, such as using utm_source=facebook in some campaigns and utm_source=facebook.com in others. It would assign these leads to the correct channel (Paid Social in this case) regardless of these inconsistencies, again ensuring you have more accurate data.

Captures landing page data

Attributer captures the landing page URL (e.g. https://attributer.io/blog/track-facebook-ads-wordpress) and landing page group, (e.g. /blog).

This allows you to track how many leads you are generating from sections of content on your site (I.e. your blog), as well as drill down to see how many leads you're getting from each individual blog post.

3 example reports that will help you understand the performance of your Facebook Ads campaigns

If you use Attributer to capture Facebook Ads data in your WordPress forms, and you send it to a CRM or spreadsheet, then you're able to easily build reports & dashboards that show you how your Facebook Ads are performing.

As someone who has ran marketing & analytics teams for over 15 years (and ran hundreds of reports to track how our Facebook Ads were performing), I've found a couple of reports that are particularly useful in understanding how your Facebook Ads are going.

To help you get started, I've included those reports below:

1. Leads by channel

Leads By Channel (5)

If you're using Attributer, then you'll get information on the source of ALL your leads, not just those from your Facebook Ads.

That will allow you to build reports like the one above, which show you the number of leads you're generating each month by the channel they came from (I.e. Paid Social, Paid Search, Organic Search, etc)

This gives you a good, high-level overview of what's driving your leads and where you should be investing your time and money to get more of them.

2. Leads by Network

Leads By Facebook Ad Network

If you’re running ads on Facebook, there's a pretty good chance you're also running them on Instagram & maybe even Messenger & Whatsapp.

If that's the case, this report (which shows the number of leads generated by ad network) can help you understand which social app your ads are performing best on, and ultimately where you should be focusing to get the most leads at the lowest cost.

3. Leads by campaign

Leads By Facebook Ad Campaign (1)

This chart shows how many leads each of your Facebook Ad campaigns are driving you each month.

Running this report can help you see which  campaigns are actually driving leads, versus those that are just generating clicks and website visitors that don't actually convert.

Wrap up

If you're looking for a way to track how many leads & customers you get from your Facebook Ads, then Attributer is a great solution.

It will pass through the exact source of each of your leads, right down to the exact campaign and ad they clicked and you'll be able to instantly see this data in your WordPress dashboard or include it in your email notifications.

Furthermore, you can send this data into your CRM (or other sales & marketing tools) and run reports that show how many leads & customers you're getting from Facebook Ads, which campaigns are performing best, and much more.

Best of all, it's free to get started and only takes about 10 minutes to set up, so start your free trial today!

Get Started For Free

Start your 14-day free trial of Attributer today!

aaron-beashel

About the Author

Aaron Beashel is the founder of Attributer and has over 15 years of experience in marketing & analytics. He is a recognized expert in the subject and has written articles for leading websites such as Hubspot, Zapier, Search Engine Journal, Buffer, Unbounce & more. Learn more about Aaron here.