Table of contents
Not only is Google Analytics 4 knocking on our marketing doors anymore, but also privacy and cookie issues. These are two very hot topics in recent months, of which the topic of cookies has been somewhat covered by GA4, and should not be forgotten! In this article we will look at a tool that is worth becoming friends with, because in the near future it will replace the well-known Facebook Pixel (Meta Pixel). But let’s start at the beginning…
What is a conversion API?
ConversionAPI is a tool with which we can collect data on how users interact with our website or mobile app and feed it to Facebook’s advertising platform to optimize our ad campaigns. This allows us to collect the data we need for reporting, ad targeting, as well as the optimization itself and improve the performance of our campaigns.
Facebook plans to replace the current Facebook Pixel, Conversion API in the future, but as of yet there is no exact date as to when this will happen. Various dates have been mentioned so far, but one of them says it will happen in 2023. However, why is there such a need?”
Facebook pixel vs. conversion API
How does Facebook’s Pixel work?
This is a snippet of code that you place on your site either directly or using Google Tag Manager
Then, when a user accesses your site – the Pixel script is run and assigns a specific cookie to that user. From that moment on, every action on your site (e.g., form fills, clicks, transactions, etc.) will be recorded and sent to Facebook, and we will see this information in the Ads Manager. That is, as you can see – everything is based on the data collected and transmitted by the cookie.
How does this whole process look like? When a user visits your site, it must be launched from the servers on which it is set up. What actions are performed on it we can observe from both the browser and just the server. And this is where the Conversion API, which sends data from the server to Facebook, comes to the rescue. The API, just like Pixel, gives each user an individual ID, by which it is able to track further activities on our site.
So it might seem that the two tools do the same thing, however, not necessarily. Pixel uses a browser, while the API uses a server.
Pixel uses a browser, while the API uses a server.
Benefits of using the conversion API
If this still doesn’t convince you and you’re wondering if it’s worth it to implement API event tracking for yourself (or your clients), I’d like to show you a few more reasons why API can benefit you more than Pixel:
- No privacy and cookie issues
Facebook’s conversion API is completely cookie-independent, so tracking will not be blocked by any ad blockers. Properly implemented, the API also works in accordance with all legal regulations regarding privacy policies.
- Tracking conversions across multiple platforms and devices
ConversionAPI allows you to collect and report conversion data from a variety of sources, not just Facebook. Additionally, it makes it much easier to analyze traffic if it comes from different devices.
- Analysis of key conversions
Conversions that are at the final stages of your funnel are often made not on the site, but, for example, by phone or through an app. The API allows you to send these conversions to Facebook, so you can better optimize your advertising efforts.
- Full control over your data
The Conversion API allows you to customize exactly how data is collected and transmitted to suit your individual needs and preferences. In addition, the data collected by the conversion API is stored on your own server, giving you full control over it.
We won’t kid ourselves, the conversion API also has its drawbacks. The main one is the somewhat complicated integration, which sometimes requires programming expertise or cooperation with developers, and this often comes at an additional cost. However, in the final analysis, you’ll probably agree that the advantages outweigh any difficulties along the way.
Looking at the fact that Pixel and the conversion API work very similarly, one conclusion may come to us, quite correct by the way – our events will duplicate!
Unless… you configure event deduplication! Let me explain it to you in the simplest possible way :).
Event deduplication associated with Pixel and Conversion API is the process of eliminating duplicate conversions that have been recorded by these two Facebook tools. Duplicate conversions can occur when events are recorded by Pixel and Conversion API at the same time or in quick succession, which can lead to skewed analysis and optimization of ad campaigns. To avoid this problem, Facebook uses an event deduplication mechanism to eliminate duplicate conversions.
In order for everything to work properly, it is imperative that we pay attention to the configuration process and ensure that the collected events have the same identifiers and parameters. This way, the system will be able to assess whether the signal it receives from the server has not already appeared, sent by Pixel, and will ultimately leave the event information from only one tool.
How to deploy Facebook’s conversion API?
We have three ways to implement:
- through partner services (e.g. WordPress, WooCommerce, Zapier, Magento, Shopify),
- by manually adding code to our site,
- by using the conversion API gateway.
Today I’m going to show you the two simplest ways, namely integration using a plugin and using partner services.
Integration using the PixelYourSite plugin (for sites built on WordPress)
- In your WordPress cockpit, install and activate the PixelYourSite plugin.
- Return to “Event Manager“, find your Pixel ID, copy it.
- Now go back to the PixelYourSite plugin panel and paste there the Pixel copied earlier in the field “Your Facebook Pixel“
- Next, in the “Event Manager” panel, we click on “Settings” and we need to find the section related to “API conversion“. You will perform the next step only if you have administrator privileges.
- Click on the “Generate Access Token” button, copy it, then go back to the plugin panel on WordPress and paste the token into the “API Token”
- Finally, don’t forget to enable the “Enable Conversion API” option at the very top of the plugin panel.
Bravo, done! Now all that’s left is to test if everything works as expected.
- We return to the “Event Manager” and go to the “Testing Events” tab.
- In the plugin panel, paste the code “test_event_code” and then save the settings.
- Open your site in a separate tab. If everything works correctly, you will see correctly received events in the event manager.
- Remember to remove the test code from the PixelYourSite plugin panel after the test is done!
Integration via partner service (using WordPress as an example)
- In Facebook’s “Event Manager“, locate the “ConversionAPI” section and click “Select Partner“.
- Choose (in this case) the WordPress service and in the window that appears to you – press the button “Create Access Token“.
- Copy it, move on, and then download the plugin to WordPress.
- In the WordPress dashboard, in the “Plugins” section, click the “Submit plugins to server” button visible at the very top of the screen.
- Add the downloaded .zip plugin and click “Install“, and after installing it, click “Activate Plugin“.
- Go back to “Event Manager“, copy the Pixel code and paste it in the plugin panel in the Pixel ID field.
- Next, enable “Enable Advanced Matching” and another “Enable the Server-Side API to Send Events…“.
- Copy the access code and paste it into the box below.
- Save the changes and run the test again in the event manager.
Start using Facebook’s conversion API!
Our specialists will help you integrate Facebook’s conversion API so that you can effectively analyze and optimize your advertising campaigns on this platform.
As it turns out, the API is not as scary as they paint it :). Keep in mind, however, that in this article I showed you the two simplest ways that will pass the test if your site is set up on WordPress. If you use other platforms or partners, the integration may look a little different and may be more difficult. But don’t leave it to the last minute, and if you need help implementing a conversion API, you can always apply to digital marketing agency