Using Facebook server-side tracking (Facebook Conversions API) is getting more popular due to its ability to prevent tracking pixel blocking by ITPs and AdBlockers. Another massive benefit of Facebook conversion API is that it increases FB cookie lifetime. If you haven’t yet implemented FB Conversions API on your site, follow this guide.
In this article, I will describe how to set up Facebook events deduplication if you are using both browser and server tracking methods for your site.
The Facebook pixel and Conversions API lets you share standard and custom events with FB so that you can measure and optimize ad performance. The pixel enables you to share web events from a web browser, while the Conversions API lets you share web events directly from the cloud server.
Both Facebook pixel and Facebook conversion API let you send events. The difference is that pixel sends events from the browser, and CAPI sends events from the server. If you tell Facebook that the browser and server method send identical events, they will accept one and discard another.
There are several ways of setting up Facebook tracking, including the following:
If you decide to use both browser and server events tracking for all your events, in this case, you will need to set up event deduplication. With Facebook event deduplication, FB will receive all your events, understand that events are identical, clean some of them, and keep others. If you combine the browser and server method but do not set up event deduplication, your data will not be correct because all the events will be tracked twice.
Facebook requires sending two event parameters for event deduplication: its event name and event ID. You already sending the event name with the existing setup. This article will cover how to configure Facebook event ID inside the Google Tag Manager container.
Facebook has two way of identifying duplicated events that were sent from browser and server:
1. Event ID and event name.
Facebook recommends this method, and we will cover it in our how-to. For this method, you must use event ID for all events you send via pixel and CAPI. FB will deduplicate Facebook Pixels and Conversion API events with identical event names and event IDs. Facebook gives more credit to the browser event, and if they see similar events and come within 5 minutes difference, they will keep browser events and clean server events.
2. FBP or External ID
This method exists but is not recommended by Facebook. In this case, you will need to send the event name, fbp, and/or external_id for all your browser and server events. Facebook compares all these parameters and identifies if they already have a browser event with these parameters, and if they do, they discard server events. FB does not recommend using these events since they can identify deduplication only if the browser event was sent first. It means that if you send a server event first, events will be duplicated.
Facebook also can merge events. For example, if you send some enriched data from the server, you can add the missing data to the browser event. That is not a default feature. To enable it, you should contact a Facebook representative.
Comments