Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setting up client-side Pinterest Ads tracking with deduplication

Setting up client- and server-side tagging for Pinterest Ads with event_id deduplication

Running both server-side and client-side tagging means Pinterest receives the same conversion twice: once from the browser and once from your server. Deduplication is what stops that from being counted twice. It works when both events carry the same event name and the same event_id.

So the goal throughout this guide is that your Pinterest Tag, your GA4 tag and your server-side Pinterest Conversions API tag all describe the same interaction with the same event ID.

Before you start

Make sure you have:

Step 1: Create a variable for your Pixel ID

  1. Open your GTM web container and go to Variables.

  2. Create a new User-Defined Variable and choose Constant as the variable type.

  3. Enter your Pinterest Tag ID as the value and save the variable.

Using a constant variable rather than typing the ID into each tag means you only have one place to change it later.

Step 2: Create your Pinterest Base Code tag

  1. Go to Tags and create a new tag. Select the Pinterest Tag as the tag configuration.

  1. In the Tag ID field, select your Tag ID variable.

  2. As the Event to Fire select Base Code Only (no event).

  3. Give this tag the trigger you use for all pages (Page View / cookie_consent_update)

Step 3: Create the conversion tags

  1. Create a new tag, select the Pinterest Tag as tag configuration.

  2. Fill in the Pinterest Tag ID variable.

  3. As the Event to Fire indicate whether this is a standard or a custom event. Select a standard event from the dropdown menu, or type a custom event name into the input field.

  4. Select Custom Parameters under Additional Parameters. Add event_id as parameter name and your Unique Event ID variable as the value.

  5. As the trigger, select the same trigger you use for the GA4 event tag covering this interaction.

  6. Save the tag. And repeat for the other events and conversions you want to set up.

Step 4: Add the event_id to your GA4 events

Your GA4 event tags are what feed the server container, so the event ID has to travel with them. For every interaction you want to deduplicate, add your Unique Event ID variable as an event_id event parameter on the GA4 event tag that fires on that interaction.

Step 5: Test and Verify

Open Google Tag Manager's preview mode to check whether the event_id in the client-side TikTok Event tag matches the server-side TikTok Events API tag. If this is not the case, the usual causes are:

  • The event names do not match. The Pixel sends one name and the server-side tag sends another.

  • The event IDs do not match, or the server-side tag receives no event ID at all.

  • The two tags fire on different triggers, so they never describe the same interaction.

Last updated

Was this helpful?