How to Send Facebook Pixel Events via the Conversion API (Using Zapier)

With browser-side tools like the Facebook Pixel falling out of fashion, you need to know how to send Pixel events via Facebook’s Conversions API—and we’ll show you how to do this really easily using Zapier.

In order to follow this tutorial, make sure that you have a Zapier account with integrations for the tools where you’ll be tracking conversions. (In this guide, we’ll be using Google Forms as an example.)

An overview of what we’ll cover:

So let’s dive in!

Creating a Zap and Adding a Trigger

In your Zapier account, start by clicking the Create Zap button.

Creating a Zap inside the Zapier

Next, we’ll need to add a trigger. The trigger is the place where you’ll pull data from, to send it to the Facebook Conversions API. 

In this example, I’ll be using a Google Form. I also already have this Google Form configured to automatically add response data to a Google Sheet.

💡 Top Tip: You could also use something like ActiveCampaign or Hubspot as your trigger. It doesn’t really matter as long as you’re pulling the correct information to send to the Conversions API. (If you want to learn more about tracking ActiveCampaign events, check out our handy guide on ActiveCampaign event tracking with Google Tag Manager.)

In the Choose app & event section, select Google Forms (or your integrated trigger of choice) and set it to trigger a New Response in Spreadsheet.

Setting the Zap to get triggered when a new response row is added to the bottom of a spreadsheet

Under Choose account, select the correct account for the app you’d like to use. Then, under Set up trigger, select the Spreadsheet (where data should go) and Worksheet (event trigger) that you want to use for this event. 

n this case, that means a Demo Zapier spreadsheet that I’ve created to record form submission data and the Form Responses 1 Google Form that will collect user responses.

Choosing Spreadsheet Demo Zapier to which the data will be transferred, and Worksheet Form Responses 1 from which the data will be transferred

Before you go any further, I recommend testing this out so that you know everything’s connected properly. In another tab, trigger your event to see data populate your spreadsheet (in this case, I just submit my Google Form with some sample data).

…And you should see the values from your event added to your spreadsheet.

Form value from the worksheet transferred to the Demo Zapier spreadsheet

Click the Test trigger button back on your Zapier tab to make sure this information is gathered correctly. 

If everything is working, we should see the event information appear here.

Testing the trigger that we have created in Zapier

Sending Data to the Facebook Conversions API

Next, we need to instruct Zapier to send this information to the Facebook Conversions API. 

You have to choose Facebook Conversions for the app event which Zap performs after it starts—make sure you DON’T choose Facebook Offline Conversions, since that’s something totally different. 

In this example, I’ll be sending an event in which a user purchases something. So for the Action Event, I’ll select Send Purchase Event.

Selecting Facebook Conversions as the app event and Send Purchase Event as action event which Zap performs after it starts

Sign into your Facebook Conversions, then click Continue to start setting up the action. 

For this demo, we’ll work with a scenario where a user purchases an item on our website; therefore, we’ll choose the Website option for the Action Source.

Then, just choose the Business Account that’s associated with the Facebook Pixel you want to send the information to and select that Pixel.

Choosing Website as the location of where the event occurs, Business Account which will receive the event, and Demo’s Pixel as the Facebook Pixel to which the event will be sent

Now we need to add the event information, which will come from our spreadsheet. First, we need the event time, which must be in Unix timestamp in seconds format. (If the timestamp in your spreadsheet is not in this format, automate a conversion in another column that you can pull from.)

Under Event Time, select the spreadsheet column that collects your events’ timestamps. This will add the timestamp to the event info of your zap. 

Selecting the Event Time which needs to be in Unix timestamp in seconds format

🚨 Note: It’s true that if the Event Time is left empty when your zap fires, a timestamp will be automatically added to this box. Don’t do this. Facebook is really clear in their documentation that the event time needs to be exactly the same time (down to the second) as when the event occurred on your website or in your app. And especially if you’re using a lower-tier Zapier plan, your timestamp may be delayed by up to fifty minutes. Not a good idea.

Event ID is used to remove duplicates when sending the same event from more than one source (such as using both a Pixel and the Conversions API).

In this guide, I won’t be adding an Event ID, but make sure to do this if you’re sending an event with both the Conversions API and the client’s browser (a Pixel). Otherwise, you’ll end up with duplicate event data.

The Event Source URL is the URL where the web event occurred. This is where you put the webpage URL where the user converted.

The Test Event Code is how you make sure that your Zap is working correctly. It’s important, but we’ll come back to this later. 

You should only select True for Opt-out Of Ads Delivery Optimization if the event should be used for attribution. In this example, I don’t want that. I also won’t add any of the Data Processing Options because this is a demo, but feel free to add any that are useful to your situation.

Assign Form Fields to Your Event

Next is the Customer Information section. Here, you’ll add values from your Google Sheet that describe your event. It should be pretty easy to just go through the fields and select the corresponding data.

Customer information of the purchase event from Google Forms

Once you’ve entered all of these, there are also some optional fields that you can use to pass additional information to Facebook.

If you have any of these information fields available to you, I recommend using as many as possible to help with the quality match rate (Facebook’s ability to match the information that you are sending).

You can even unlock additional fields by setting Show All Fields to True. For any data that you have, this will just help flesh out your marketing data even more.

Continue this process with the Custom Parameters section. There’s actually a pretty long list of custom data parameters that you can send to the Facebook Pixel, so take advantage of these if you have them.

Connect Facebook Events Manager to Zapier

If you haven’t done this already, you’ll need to connect your Facebook Events Manager to Zapier. To do this, go into Business ToolsEvents Manager. (Make sure that you have the right Pixel selected!)

Pathway to the Events Manager inside of Facebook Pixel

Click on Settings. Under the Conversions API, you’ll have the option to Choose a Partner. Obviously, we’ll select Zapier.

Connecting Zapier with your Facebook pixel

Test Your Zap & Activate

Once Zapier is connected, the final step is to test and activate your Zap.

To do this, you’ll need to get something called a Test Event Code from the Events Manager.  Go to the Test Events tab and under the Test Server Events heading, you’ll see a code that we’re going to copy.

Copying the code from the Demo’s Pixel which we’ll use in Zapier to test our zap

We’ll use this code in Zapier to test our Zap—remember that Test Event Code field under the Set up action section? Go there and paste the code.

Adding the Test Event Code which counts events as test events and it will be used when you test and review your zap

Why didn’t we add the Test Event Code earlier? Because you should only populate the Test Event Code field while you’re actively testing your Zap.

If you leave the Test Event Code on an activated Zap, it’ll interfere with your event data. So, best practice is to only add it while you’re in testing mode, then remove it right away before activating.

So let’s test. Scroll down (click Continue through the other sections) and click Test & Review.

Test & Review button which allows you to check if your zap is set up correctly

If everything is set up correctly, you should see a purchase event coming from the server using the Conversions API. You’ll also get a little success message, but double-check that all the data is correct, too, just in case.

A successful test of sending a purchase event to the Facebook Conversions API

To make sure the correct data was sent and recorded, go to your Events Manager and find your new purchase event, which will appear under Events Received in the Test Events tab.

Purchase event has been processed in the Facebook Pixel

By clicking on the purchase event, we can see its information. You’ll see that it was received from a server, which confirms that it’s a Conversions API event instead of a Pixel event.

So everything looks good! It’s time to remove the test code and launch your functional Zap.

Go back up to the Set up action section and remove the Test Event Code. Just leave this field empty.

Then, switch the little toggle on the right-side of your topbar to On. Scroll down and hit Continue, then click Turn on Zap.

Now we have a Zap that gets triggered every time someone submits a form that I’ve created, and it sends all that information to the Facebook server using the Conversions API. Neat!

Summary

That’s it! This is how you can send Pixel events to Facebook using the Conversions API and Zapier.

As mentioned, this was more for demo purposes on how you’d be able to send data into the Conversions API via Zapier. Make sure you configure your spreadsheet correctly and double-check all your data while testing to get the most use out of this technique!

Besides Zapier, you could also track Facebook pixel purchases and conversions with Google Tag Manager if you don’t need to use server-side event tracking.

Have you used the Facebook Conversions API to successfully track events? What’s your preference between server and browser event tracking? Let us know in the comments down below!

JOIN US!

Master Data & Analytics with Measuremasters

Exclusive Courses & Workshops | Ongoing Troubleshooting | Support Resources, Tools & much more
guest
0 Comments
Inline Feedbacks
View all comments

Blog Categories

Join 30,000+ marketers getting exclusive resources and our latest content!

now it's time to

Start measuring like a master

Itching to jump into the world of MeasureMasters? This is what you have to look forward to.