
How to Fix Meta and TikTok Event Deduplication in GTM
Troubleshoot duplicate conversions in Meta and TikTok. Learn where to get a shared event ID and how to verify it in browser and server requests.

Rahul Parelkar
Senior Implementation Specialist
Rahul brings together technical expertise and delivery leadership to help organizations turn data into insights and insights into action.
If you're running server-side tracking for Meta or TikTok, you're probably sending the same conversion two ways: through the browser and through a server-side API.
That's not a problem by itself. In fact, that's the normal setup. The browser pixel gives the platform browser and device information, while the server-side request gives you another path for sending the conversion.
The important part is making sure the platform knows those two events are actually the same conversion.
That's what event_id is for.
If the browser and server events use the same event_id, the platform can recognize them as duplicates and count them as one conversion. If they don't, you can end up with something like 200 conversions reported by the ad platform when the backend only has 100 actual purchases.
When I run into a double-counting issue like that, I don't start by digging through the ad platform's reporting. I start with the implementation and look at exactly where the event_id is coming from.
Why GTM can send two different event IDs
Both the client-side tag and the server-side transport tag need to send the same event_id.
One mistake I've seen is using a Custom JavaScript variable to generate the ID dynamically. It might be something as simple as:
return Date.now() + '_' + Math.random();
At first, this looks perfectly reasonable. You get a unique value every time the variable runs.
That's also the problem.
A standard Custom JavaScript variable in GTM can be evaluated every time a tag references it. It isn't automatically a single value that's generated once and then reused by every tag involved in the interaction.
So imagine a user submits a form and two tags fire.
The Meta tag references the variable and gets:
1723405100001_05
The GA4 transport tag then references the same variable and gets:
1723405100045_09
Both tags fired successfully. GTM isn't necessarily showing you an obvious error. But the two requests now have different IDs.
By the time they reach Meta, they look like two separate conversions.
This is one of those issues that's easy to miss because the implementation can look completely fine when you're just looking at which tags fired.
Don't create a new ID if you already have one
Before creating a new GTM variable or asking a developer to add UUIDs, check what the site is already sending.
For ecommerce, there is often already a useful identifier in the data layer. A transaction_id or order_id may be available and unique to the purchase.
If that's the case, use it.
There's not much value in creating a second identifier just so GTM can call it event_id. If transaction_id is already unique and available to both tagging paths, map it to event_id in both the client and server-side implementations.
For example:
transaction_id → event_id
That's one less thing to maintain and one less place for the implementation to go wrong.
This is different for events like generate_lead, signups, or other non-commerce conversions where there may not be an existing backend identifier available at the time the event happens.
In those cases, you may need to generate one.
My preferred approach: generate the ID in the application
If we need a new identifier, I'd rather have the application generate it than have GTM create it.
The application can generate a UUID and include it in the data layer event:
dataLayer.push({
event: 'generate_lead',
event_id: '123e4567-e89b-12d3-a456-426614174000',
lead_type: 'b2b'
});
GTM then has a very simple job: read event_id with a Data Layer Variable and pass it along.
The value already exists. GTM isn't generating it, and another tag referencing the variable isn't going to create a different value.
If several tags fire from that same data layer event, they all read the same ID.
I prefer this approach because it keeps the logic in one place. The application generates the identifier, the data layer exposes it, and GTM passes it through.
It also makes troubleshooting easier. If something is wrong, you can start with the data layer and work your way through the tagging instead of trying to figure out what GTM generated at runtime.
What if you can't get a developer ticket?
The application-level approach is my preference, but it isn't always realistic.
Sometimes you're dealing with a third-party CMS. Sometimes the site is already in production and the development team doesn't have room for another ticket. And sometimes getting a small tracking change through the development process takes longer than the tracking work itself.
In those cases, there are GTM-side options.
One approach is using a variable template that generates an ID and associates it with the current GTM event. The "Unique Event ID" template originally authored by Simo Ahava is one example.
The important difference from a basic Custom JavaScript variable is that the generated value can be retained for the current GTM event rather than regenerated every time a tag references the variable.
There is one catch that matters quite a bit.
The tags need to be firing from the same GTM event.
For example, if your Meta tag fires from a Click trigger but your server-side GA4 tag fires from a separate Element Visibility event, you're not dealing with one GTM event anymore.
The template can give those events different IDs.
So the GTM-only approach can work, but you need to understand what event each tag is actually attached to. Don't assume that because two tags are related to the same user action, GTM considers them the same event.
Other things to check
Getting event_id right is the main piece, but there are a few other things I'd check before blaming the deduplication system.
Event names
For platforms that use both event_name and event_id when matching events, make sure the names are consistent.
For example:
Browser: purchase
Server: purchase
is what you want.
If one implementation sends Purchase and the other sends purchase, don't assume the platform will treat them as the same event.
I'd standardize the event naming between the web and server containers rather than trying to account for differences downstream.
Redirects
Another thing I look at is what happens immediately after the conversion.
A common example is a form submission that sends the user straight to a Thank You page.
The browser may start the tracking requests and then immediately navigate away. Depending on the request and browser behavior, one of those requests may not make it through.
navigator.sendBeacon() helps with this type of situation, but it isn't something I'd treat as a guarantee that every request will always complete.
If I see a conversion flow with an unusually low match or deduplication rate, I'll look at the redirect timing and the actual network requests before changing anything.
If the redirect is part of the problem, the right fix depends on the implementation. That could mean using GTM's "Wait for Tags" functionality or having the development team change how the form submission and redirect are handled.
I wouldn't add an arbitrary delay just because the tracking isn't working. First prove that the redirect is actually causing the request to fail.
How to verify event deduplication in GTM
I don't publish a deduplication change and then wait for Meta's reporting to tell me whether it worked.
I check the payloads first.
In Web GTM Preview, trigger the conversion and select the event where the tags fired. Check the Variables tab and confirm what event_id is being passed to the client-side tag.
Then check the server-side container and confirm that the transport event contains the same value.
If possible, I also check the browser's Network tab. This is especially useful because it lets you see what was actually sent rather than what GTM says it intended to send.
You want to end up with something like:
Checkpoint | What the reader should look for |
|---|---|
Website data layer | The completed purchase has |
Browser Pixel | The Meta Pixel sends |
Server-side GTM | The incoming event contains |
Ad platform | Confirm that the platform received both copies and check its deduplication diagnostics. |
If the IDs don't match in the actual requests, I wouldn't spend much time in Meta's Test Events tool yet. Fix the implementation first.
Once the requests look right, then move downstream and confirm that the ad platform is receiving both events and treating them as duplicates.
After the change is live, keep an eye on the platform's deduplication diagnostics and conversion reporting for a few days. These interfaces don't always update immediately, so don't expect the reporting to change the second you publish the fix.
The simple version
The easiest way to avoid this problem is not to make GTM do work it doesn't need to do.
If the application already gives you a unique transaction_id or order_id, use it.
If you need a new identifier, generate it once in the application and put it in the data layer.
If you can't get a development change made, a GTM template that retains the ID for the current GTM event can be a reasonable fallback. Just make sure the tags involved are actually firing from the same GTM event.
And when you're troubleshooting, don't stop at "the tags fired."
Look at the actual requests.
If the browser and server payloads contain the same event name and the same event ID, you're in a much better position to troubleshoot what happens next.
Need help troubleshooting duplicate conversions?
If Meta or TikTok is reporting more conversions than you can account for, Napkyn can help you find out why. We’ll trace a purchase or lead through your browser and server-side tracking, compare the event names and IDs each platform receives, and pinpoint where the numbers start to diverge.
Whether you need a second set of eyes on your Google Tag Manager setup or help implementing and testing a fix, get in touch with Napkyn about your conversion tracking.
More Insights

How to Fix Meta and TikTok Event Deduplication in GTM

Rahul Parelkar
Senior Implementation Specialist
Nov 25, 2026
Read More

Buying the technology is the easy part

Jasmine Libert
Senior VP Growth and GTM
Nov 10, 2026
Read More

What’s New in Google Analytics: More Room for Curiosity

Chris Wright
Associate Director, Training and Development
Oct 28, 2026
Read More
More Insights
Sign Up For Our Newsletter

Napkyn Inc.
204-78 George Street, Ottawa, Ontario, K1N 5W1, Canada
Napkyn US
6 East 32nd Street, 9th Floor, New York, NY 10016, USA
212-247-0800 | info@napkyn.com

How to Fix Meta and TikTok Event Deduplication in GTM
Troubleshoot duplicate conversions in Meta and TikTok. Learn where to get a shared event ID and how to verify it in browser and server requests.

Rahul Parelkar
Senior Implementation Specialist
November 25, 2026
Rahul brings together technical expertise and delivery leadership to help organizations turn data into insights and insights into action.
If you're running server-side tracking for Meta or TikTok, you're probably sending the same conversion two ways: through the browser and through a server-side API.
That's not a problem by itself. In fact, that's the normal setup. The browser pixel gives the platform browser and device information, while the server-side request gives you another path for sending the conversion.
The important part is making sure the platform knows those two events are actually the same conversion.
That's what event_id is for.
If the browser and server events use the same event_id, the platform can recognize them as duplicates and count them as one conversion. If they don't, you can end up with something like 200 conversions reported by the ad platform when the backend only has 100 actual purchases.
When I run into a double-counting issue like that, I don't start by digging through the ad platform's reporting. I start with the implementation and look at exactly where the event_id is coming from.
Why GTM can send two different event IDs
Both the client-side tag and the server-side transport tag need to send the same event_id.
One mistake I've seen is using a Custom JavaScript variable to generate the ID dynamically. It might be something as simple as:
return Date.now() + '_' + Math.random();
At first, this looks perfectly reasonable. You get a unique value every time the variable runs.
That's also the problem.
A standard Custom JavaScript variable in GTM can be evaluated every time a tag references it. It isn't automatically a single value that's generated once and then reused by every tag involved in the interaction.
So imagine a user submits a form and two tags fire.
The Meta tag references the variable and gets:
1723405100001_05
The GA4 transport tag then references the same variable and gets:
1723405100045_09
Both tags fired successfully. GTM isn't necessarily showing you an obvious error. But the two requests now have different IDs.
By the time they reach Meta, they look like two separate conversions.
This is one of those issues that's easy to miss because the implementation can look completely fine when you're just looking at which tags fired.
Don't create a new ID if you already have one
Before creating a new GTM variable or asking a developer to add UUIDs, check what the site is already sending.
For ecommerce, there is often already a useful identifier in the data layer. A transaction_id or order_id may be available and unique to the purchase.
If that's the case, use it.
There's not much value in creating a second identifier just so GTM can call it event_id. If transaction_id is already unique and available to both tagging paths, map it to event_id in both the client and server-side implementations.
For example:
transaction_id → event_id
That's one less thing to maintain and one less place for the implementation to go wrong.
This is different for events like generate_lead, signups, or other non-commerce conversions where there may not be an existing backend identifier available at the time the event happens.
In those cases, you may need to generate one.
My preferred approach: generate the ID in the application
If we need a new identifier, I'd rather have the application generate it than have GTM create it.
The application can generate a UUID and include it in the data layer event:
dataLayer.push({
event: 'generate_lead',
event_id: '123e4567-e89b-12d3-a456-426614174000',
lead_type: 'b2b'
});
GTM then has a very simple job: read event_id with a Data Layer Variable and pass it along.
The value already exists. GTM isn't generating it, and another tag referencing the variable isn't going to create a different value.
If several tags fire from that same data layer event, they all read the same ID.
I prefer this approach because it keeps the logic in one place. The application generates the identifier, the data layer exposes it, and GTM passes it through.
It also makes troubleshooting easier. If something is wrong, you can start with the data layer and work your way through the tagging instead of trying to figure out what GTM generated at runtime.
What if you can't get a developer ticket?
The application-level approach is my preference, but it isn't always realistic.
Sometimes you're dealing with a third-party CMS. Sometimes the site is already in production and the development team doesn't have room for another ticket. And sometimes getting a small tracking change through the development process takes longer than the tracking work itself.
In those cases, there are GTM-side options.
One approach is using a variable template that generates an ID and associates it with the current GTM event. The "Unique Event ID" template originally authored by Simo Ahava is one example.
The important difference from a basic Custom JavaScript variable is that the generated value can be retained for the current GTM event rather than regenerated every time a tag references the variable.
There is one catch that matters quite a bit.
The tags need to be firing from the same GTM event.
For example, if your Meta tag fires from a Click trigger but your server-side GA4 tag fires from a separate Element Visibility event, you're not dealing with one GTM event anymore.
The template can give those events different IDs.
So the GTM-only approach can work, but you need to understand what event each tag is actually attached to. Don't assume that because two tags are related to the same user action, GTM considers them the same event.
Other things to check
Getting event_id right is the main piece, but there are a few other things I'd check before blaming the deduplication system.
Event names
For platforms that use both event_name and event_id when matching events, make sure the names are consistent.
For example:
Browser: purchase
Server: purchase
is what you want.
If one implementation sends Purchase and the other sends purchase, don't assume the platform will treat them as the same event.
I'd standardize the event naming between the web and server containers rather than trying to account for differences downstream.
Redirects
Another thing I look at is what happens immediately after the conversion.
A common example is a form submission that sends the user straight to a Thank You page.
The browser may start the tracking requests and then immediately navigate away. Depending on the request and browser behavior, one of those requests may not make it through.
navigator.sendBeacon() helps with this type of situation, but it isn't something I'd treat as a guarantee that every request will always complete.
If I see a conversion flow with an unusually low match or deduplication rate, I'll look at the redirect timing and the actual network requests before changing anything.
If the redirect is part of the problem, the right fix depends on the implementation. That could mean using GTM's "Wait for Tags" functionality or having the development team change how the form submission and redirect are handled.
I wouldn't add an arbitrary delay just because the tracking isn't working. First prove that the redirect is actually causing the request to fail.
How to verify event deduplication in GTM
I don't publish a deduplication change and then wait for Meta's reporting to tell me whether it worked.
I check the payloads first.
In Web GTM Preview, trigger the conversion and select the event where the tags fired. Check the Variables tab and confirm what event_id is being passed to the client-side tag.
Then check the server-side container and confirm that the transport event contains the same value.
If possible, I also check the browser's Network tab. This is especially useful because it lets you see what was actually sent rather than what GTM says it intended to send.
You want to end up with something like:
Checkpoint | What the reader should look for |
|---|---|
Website data layer | The completed purchase has |
Browser Pixel | The Meta Pixel sends |
Server-side GTM | The incoming event contains |
Ad platform | Confirm that the platform received both copies and check its deduplication diagnostics. |
If the IDs don't match in the actual requests, I wouldn't spend much time in Meta's Test Events tool yet. Fix the implementation first.
Once the requests look right, then move downstream and confirm that the ad platform is receiving both events and treating them as duplicates.
After the change is live, keep an eye on the platform's deduplication diagnostics and conversion reporting for a few days. These interfaces don't always update immediately, so don't expect the reporting to change the second you publish the fix.
The simple version
The easiest way to avoid this problem is not to make GTM do work it doesn't need to do.
If the application already gives you a unique transaction_id or order_id, use it.
If you need a new identifier, generate it once in the application and put it in the data layer.
If you can't get a development change made, a GTM template that retains the ID for the current GTM event can be a reasonable fallback. Just make sure the tags involved are actually firing from the same GTM event.
And when you're troubleshooting, don't stop at "the tags fired."
Look at the actual requests.
If the browser and server payloads contain the same event name and the same event ID, you're in a much better position to troubleshoot what happens next.
Need help troubleshooting duplicate conversions?
If Meta or TikTok is reporting more conversions than you can account for, Napkyn can help you find out why. We’ll trace a purchase or lead through your browser and server-side tracking, compare the event names and IDs each platform receives, and pinpoint where the numbers start to diverge.
Whether you need a second set of eyes on your Google Tag Manager setup or help implementing and testing a fix, get in touch with Napkyn about your conversion tracking.
More Insights

How to Fix Meta and TikTok Event Deduplication in GTM

Rahul Parelkar
Senior Implementation Specialist
Nov 25, 2026
Read More

Buying the technology is the easy part

Jasmine Libert
Senior VP Growth and GTM
Nov 10, 2026
Read More

What’s New in Google Analytics: More Room for Curiosity

Chris Wright
Associate Director, Training and Development
Oct 28, 2026
Read More
More Insights
Sign Up For Our Newsletter



