An affiliate pixel can fire twice without a customer buying twice. A confirmation page reload can rerun a tag, a retry can resend a request after a timeout, and a browser pixel and server postback can report the same purchase. A stable event ID gives you a way to recognise those requests as copies of one conversion without mistaking two similar purchases for duplicates.
The key is to separate a duplicate fire from a duplicate credit. Two requests in your logs prove that the conversion was sent twice. They do not prove the network counted it twice or that the affiliate will be paid twice. Your detection rules should show what was repeated, which copy was accepted, and what evidence you have of the network’s decision.
Define what one event ID represents
Generate the event ID when the underlying conversion is recorded, not each time a tag runs. Store it against the conversion and reuse it when the confirmation page is revisited, when a delivery is retried, or when another tracking channel reports the same action. If the browser generates a fresh ID on each page load, the receiver sees two distinct events even though the customer completed only one purchase.
Use a separate request ID or attempt number to identify each delivery. The event ID answers “Which conversion was this?” The request ID answers “Which attempt reached the receiver?” Keeping the two separate lets you count retries without inflating conversion totals and trace a bad delivery without changing the identity of the underlying sale.
An order reference can serve as an event ID if a single order always maps to a single payable conversion within the relevant scope. If the programme pays per item, milestone or renewal, that shortcut can suppress legitimate commissions. In those cases, assign an ID to each payable action and retain the order reference as a separate field for reconciliation.
Apply duplicate rules in a fixed order
Match stable IDs within the right scope
Start with an exact match on the event ID within the account or advertiser that issued it. Include the conversion type in the key if purchase and lead events can share an ID. For delivery to multiple networks, keep a separate record of whether each authorised destination received the conversion. An accepted delivery at one destination is not evidence of acceptance at another.
Do not include fields such as timestamp, delivery channel or retry number in the identity key. Those values are expected to vary between attempts. The same goes for the affiliate click ID: if a repeated purchase arrives with a different click ID, adding that field to the key can turn an attribution conflict into two payable conversions.
Check whether the repeated payload agrees
When the identity key matches, compare the fields that determine credit: conversion type, transaction reference, amount, currency and attribution fields as applicable. A repeat with the same material values can be marked as a duplicate. A repeat with a different amount or affiliate identifier should be recorded as a conflict, not accepted as a second sale or allowed to silently overwrite the first.
For example, if a browser pixel reports a purchase for £80 and the server reports the same event ID for £72, the difference might come from tax, shipping or a discount. Keep both values in the evidence log, then apply the programme’s amount rules and your documented source precedence. If the lower value reflects a later adjustment, send it through the network’s supported correction process rather than replaying the purchase.
Keep missing-ID matches provisional
A missing event ID is a tracking defect. If a legacy pixel cannot send one, use a fallback only where the alternative key is known to be unique, such as a merchant transaction reference paired with the advertiser and conversion type in a programme that pays once per order. Otherwise, flag the record for review. Two events that share a click ID, amount and timestamp may be related, but those fields alone cannot rule out two genuine purchases.
Separate an accepted conversion from a delivery attempt
Do not mark a conversion as delivered just because the first attempt was logged. The request might fail before reaching the destination, or the response might be lost after the destination accepts it. In the second case, the outcome is unknown: retrying with a new event ID risks a second credit, while suppressing the retry risks losing the conversion. Where the destination supports idempotent delivery, retry with the original event ID in the field it actually uses for deduplication. If it does not, check the destination’s transaction records or follow its documented retry procedure before resending an ambiguous attempt.
Make your local duplicate check atomic. If browser and server requests reach your collector together, both can pass a simple look-up before either writes a record. Use a unique constraint or an atomic insert on the identity key so that only one request creates the conversion. Keep delivery state separate so that claiming the conversion does not prevent recovery from a failed send. This distinction matters when using both browser and server tags, because either path can arrive first.
Choose a retention window that covers late repeats
Set the retention period for deduplication records based on the longest plausible delay: automated retries, delayed batch uploads, manual replays and return visits to confirmation pages all count. A short window may catch double clicks but miss a batch rerun the following week. If you accept historical backfills, test how they behave when the original event is older than the active deduplication store.
Check the network’s retention window separately. Your collector may remember a transaction long after the destination stops recognising its event ID. If an old conversion needs to be resent, look for evidence of prior acceptance first. Once the destination’s deduplication window has passed, a stable ID alone may not prevent a second credit.
Test with payout evidence, not just pixel logs
For each attempt, retain the event ID, request ID, source, destination, receipt time and decision. Record the destination’s transaction reference and acceptance status where available. An HTTP success response can mean the request was received without confirming that it was credited. Distinguish between locally suppressed repeats, destination-reported duplicates and confirmed duplicate credits. Those outcomes point to different fixes.
- Reload the confirmation page: the same event ID should appear again, but the conversion count should stay at one.
- Send browser and server copies in both arrival orders: verify that only one conversion is recorded and that conflicting payloads follow the same source-precedence rule.
- Retry after a timeout: verify that the retry retains the event ID and that an unknown outcome is not mistaken for a confirmed failure.
- Record two legitimate conversions with similar details: verify that matching amounts or click IDs do not suppress distinct payable events.
- Replay an older event: verify what happens when the local or destination deduplication record has expired.
Use network reconciliation reports to compare accepted transactions and commission amounts with your own conversion records. A spike in repeated requests with no increase in credited transactions points to an upstream firing or retry problem. Two credited rows for one payable action point to a gap in the deduplication key, destination mapping or replay process. Keep those findings separate so you can fix the extra traffic without treating every repeated request as a payout error.
