taggrs-logo

How do you set up Pinterest Event Deduplication?

pinterest-event-deduplication-set-up-google-tag-manager

The use of Pinterest server-side tracking(Pinterest Conversion API) is gaining ground within the digital marketing industry. This technique counteracts pixel-blocking caused by ITP’s and AdBlockers, thereby increasing the lifespan of Pinterest cookies, which is essential for accurate data analysis. When you measure Pinterest data on both the client side and the server side, some events may be measured twice. Pinterest would like to differentiate between events coming from the pixel and those from the Pinterest Conversion API, in order to achieve purer data analysis. That’s why Pinterest has introduced a “Unique Event ID. In this article, we explain how to apply Pinterest event deduplication by setting it up in Google Tag Manager. This includes setting up event deduplication both on the client side and server side to create an optimized and efficient tracking system.

Note: This blog is only about Pinterest. Deduplication is not required for most other tags unless otherwise noted.

Curious about the entire Pinterest Server Side Tracking setup? Then check out this page.

Pinterest Event Deduplication set up

pinterest-event-deduplication-set-up

Set up Pinterest Event Deduplication in Google Tag Manager (both client-side and server side).

Total Time: 10 minutes

Step 1: Create Variables (web container)

Default-workspace-webcontainer-variables

First, we must set the necessary variable before we can begin further configuration. Within the webcontainer (client side) , go to ‘Variables’ and click ‘New’. Have you already created these because you already have Meta Event Deduplication set up, for example? Then go to step 3.

Step 2: Set Variables (web container)

create-unique-event-id-variable-gtm-webcontainer

Click ‘Variable configuration’ and then choose ‘Discover more tag types in the Community Template Gallery’. Here, search for unique event id and add the ‘Unique Event ID’ variable to the workspace. Name the variable Event ID and save it.

Step 3: Select Pinterest pixels (web container)

web-container-google-tag-manager-tags

Go to “Tags” within the Web container and click on the Pinterest Pixel tag. Not set up a Pinterest Pixel yet? Then check out this blog. In this example, we are using a template. Due to the transition from UA to GA4, it is necessary to create multiple tags from this template. One per event you want to measure. Do you also have multiple tags from the Pinterest Pixel? Then add the event_id to each tag, as described below.

Step 4: Set up Pinterest pixels (web container)

pinterest-page-view-tag-set-up-google-tag-manager-web-container

Under Event to Fire, choose the event you are measuring with the pixel. In the example, we use page_view. In this event, you must select Page Visit. Next, check Custom Parameters. Then enter event_id (literally copy) under Name and add your created Unique Event ID variable under Value. Then save the tag.

Step 5: GA4 configuration tag setup (web container)

google-tag-ga4-configuration-event-deduplication

Go to Tags → Google Tag. Then, under Configuration parameter, add the following parameter: event_id – {{Event ID}}. Then Save the tag and Pinterest is deduplicated to the Client Side.

Step 6: GA4 Events tags setup (web container)

google-tag-manager-workspace-tags-web-container

Then repeat this for all GA4 Event Tags. When all the tags are setup press ‘ Submit’ at the top right to put the container live.

Step 7: Create New Variable (server container)

variables-server-container-workspace-gtm

You now have Pinterest event deduplication client side set up, nice going! Now we still need to deduplicate Pinterest into the server container (server side). Within the server container, go to Variables and click New.

Step 8: Set Variables (server container)

Set-up-event-id-variable-server-container-gtm

Click on the pencil. Then click on Event Data and select it. Then under key path enter event_id. Name the variable, for example: Event ID. Then save the variable. Don’t see Event Data listed? Then you are probably working in the client-side container instead of the server container.

Step 9: Select Pinterest Conversion API (server container)

select-pinterest-conversion-api-server-container-gtm

Within the server container, go to Tags and select the Pinterest Conversion API. Not created a Pinterest Conversion API yet? Then go to this blog.

Step 10: Customize Pinterest Conversion API (server container).

set-up-pinterest-event-deduplication-pinterest-conversion-api-tag-gtm-server-container

Click Override client data under Event Data. Next, make sure that under Parameter Name, Event ID is listed. Next, under Parameter Value, add the created variable.

Step 11: Putting container live (server container)

Now put the server container live et voilla: your first Pinterest Conversion API implementation! You have now gone through the entire Pinterest implementation process, nice going! As of now, all Pinterest events are measured and deduplicated both client-side and server-side.


About the author

Ate Keurentjes

Ate Keurentjes

Server Side Tracking Specialist at TAGGRS

Ate Keurentjes is a Server Side Tracking specialist at TAGGRS. He has experience with various Google Tag Manager concepts. Keurentjes has been editing and writing about the latest developments and trends in data collection / Server side tracking since 2023.

Ready for the next level?

Start with Server Side Tracking and generate more revenue and conversions in a world without third-party cookies.