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:

  1. Event ID of the meta pixel event and event ID of the conversion API event are identical.
  2. 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.

How can I equip my client-side tags with the event ID?

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”:

  1. In the Web GTM workspace, click on Variables in the left sidebar.
  2. Click on the blue New button and select a Variable type.
  3. Click Discover more variable types in the Community Template Gallery.
  4. Enter Unique Event ID in the search field and add the variable template “Unique Event ID” from stape-io.
  5. Name your new variable (e.g.: Event ID).
Screenshot: Event ID Variable in Web Google Tag Manager for Event Deduplication (Meta, Pinterest etc.)

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.)

  1. In the Web GTM workspace, click on Tags in the left sidebar.
  2. Click on the tag you want to equip with the event ID (in this case: Meta Pixel / Facebook Pixel).
  3. In the “More Settings” section, enter the value {{Event ID}} in the field for Event ID.
Screenshot: Meta Pixel Code with Event ID in Web GTM Container for Event Deduplication (Meta / Facebook)

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.

How can I equip my server-side conversion API tags with the event ID (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”.

  1. In the Server GTM workspace, click on Variables in the left sidebar.
  2. Click on the blue New button and select a Variable type.
  3. Select the variable type “Event data”.
  4. In the field for Key Path, enter the value event_id.
Screenshot: Event Data Variable "Event ID" in Server Google Tag Manager Container (For Event Deduplicationen in Meta, Pinterest etc.)

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:

  1. In the Server GTM workspace, click on Tags in the left sidebar.
  2. Click on the tag you want to equip with the event ID (in this case: Facebook Conversion API).
  3. 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}}.
Screenshot: Facebook Conversion API: Server Event Data Override - Property Name - Property Value - event_id - Event Deduplication for Meta

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.