You place ads on Meta (Facebook & Instagram), Pinterest and Co. and see more and more often the message that event and conversion tracking should not only be integrated on the client or browser side (via pixel or tag), but also Server-side? If the tracking is then integrated by you (or your IT department) on the server side, does the next message suddenly appear that all your events should be deduplicated? At first you understand nothing and are wondering how you can actually implement this event deduplication now?
In this case, consider yourself lucky to have landed here! In the following article we would like to give you some useful tips on how you can successfully set up event deduplication (for Meta, Pinterest and Co.) using the Event ID.
We assume that you have already used Meta Pixel and/or Pinterest Tag (and/or similar tags) on the client side and have successfully set up your server GTM container. Since event deduplication is not yet effective, event data is sent to the corresponding vendor (Meta, Pinterest, etc.) via both the browser and the server. This usually leads to events being counted twice, which is why event deduplication plays a very important role in this context – and is essential for the highest possible data quality.
Event ID and event_id parameter: What is that actually?
So that third-party providers such as Meta, Pinterest and Co. can locate and dedupe events that have been counted twice, it is necessary to send an event ID or an event_id parameter. It is important that both the “browser events” and the “server events” are equipped with the event_id parameter. If only the “browser events” are sent with event ID, but not the “server events”, Meta, Pinterest and Co. cannot carry out event deduplication.
Example: A PageView event is sent to Meta via the browser (Meta Pixel) with Event ID. The same PageView event is sent to Meta via the server (Facebook Conversion API). Here, however, without event ID. Due to the lack of the Event ID, Meta cannot recognize that it is one and the same PageView, which is why event deduplication is NOT possible in this case. Counting the corresponding event twice degrades the data quality significantly.
Now we assume that the browser PageView event and the server PageView event are sent to Meta with the same event ID. Thanks to the (matching) event ID, Meta can recognize that it is one and the same event. This is why event deduplication takes place.
According to Meta for Developers two basic conditions must be met for event deduplication to work:
- Event ID of the meta pixel event and event ID of the conversion API event are identical.
- Event name of the meta pixel event and event name of the conversion API event are identical.
These two basic conditions also apply to Pinterest and many other third parties.
You understand why the Event ID is needed for event deduplication (for Meta, Pinterest and Co.)? Great! But now you’re probably wondering how you can equip your client-side tags with the event ID or the event_id parameter? We’ll be happy to show you how!
Creation of custom variable “Event ID” in web Google Tag Manager container
The first important step is to create the custom variable “Event ID”:
- In the Web GTM workspace, click on Variables in the left sidebar.
- Click on the blue New button and select a Variable type.
- Click Discover more variable types in the Community Template Gallery.
- Enter Unique Event ID in the search field and add the variable template “Unique Event ID” from stape-io.
- Name your new variable (e.g.: Event ID).
Extension of the Meta Pixel / Facebook Pixel with the Event ID
Since there is now the variable “Event ID”, we can equip our Meta Pixel / Facebook Pixel with the Event ID. (Equipping other tags and pixels with the Event ID works very similarly.)
- In the Web GTM workspace, click on Tags in the left sidebar.
- Click on the tag you want to equip with the event ID (in this case: Meta Pixel / Facebook Pixel).
- In the “More Settings” section, enter the value {{Event ID}} in the field for Event ID.
Note: All tags and pixels in the Web GTM container that have a counterpart in the server GTM container and therefore require event deduplication must be equipped with the event ID.
After you have taken care of all the client- or browser-side tags and pixels that require the event ID extension for event deduplication, you can now turn your attention to the server-side Conversion API tags.
Creation of the event data variable “Event ID” in the server Google Tag Manager Container
Similar to the web Google Tag Manager container, you first have to create a variable in the server Google Tag Manager container. In this case, the variable type is “Event data”.
- In the Server GTM workspace, click on Variables in the left sidebar.
- Click on the blue New button and select a Variable type.
- Select the variable type “Event data”.
- In the field for Key Path, enter the value event_id.
Extension of the Facebook Conversion API with the Event ID
Similar to the Web Google Tag Manager Container, the Facebook Conversion API tag can now also be equipped with the event_id parameter:
- In the Server GTM workspace, click on Tags in the left sidebar.
- Click on the tag you want to equip with the event ID (in this case: Facebook Conversion API).
- In the “Server Event Data Override” section, enter the name Event ID in the field for Property Name and in the field for Property Value enter the value {{Event ID}}.
Tadaaaaa! If all new variables and tags have been saved and published, event deduplication should now work in principle using the event ID!
Final notes on the topic “Event deduplication using the Event ID”
As an experienced digital marketing agency that specializes in web tracking, conversion tracking, event deduplication and such, we of course know that our article here cannot fully help all advertisers. What exactly needs to be adjusted and done depends on the respective basic setup. So if you don’t quite achieve your goal with the tips above, feel free to contact us. We would be happy to make you a fair offer to solve your specific problem regarding event ID and event deduplication.