We'll be with you in a second ;)

Multi-timezone support

Docly Child

Event deduplication

Estimated reading: 5 minutes 0 views

What’s event deduplication?

Event Deduplication is a technique for detecting that a new incoming alert (event) is similar to an existing event that has already been reported suppressing the duplicate alert.

Important!

Our tech team has prepared a step-by-step guide on how to do a Facebook event deduplication with RedTrack. Since it is an advanced tutorial, it is not covered by RedTrack Support. Knowledge of web design languages such as HTML, CSS, and JavaScript may be required. We suggest hiring an expert if you are not comfortable proceeding with the following guide on your own.

We all know the difficulties we may face using both the pixel and the API conversion postback with Facebook.

And although we suggest using one method only, RedTrack has elaborated a solution for you to solve the event duplication issue. First, there are 2 possible ways to avoid the event deduplication issue:

  1. Send different types of events via browser and server, in which case there is no need to worry about the deduplication as everything will work out fine.
  2. Set the deduplication process. It’s meant for cases when you want to send the same events via both (pixel and browser). Otherwise, you will miss those events as Facebook will remove them automatically.

Ways of setting the deduplication process

There are 2 ways of setting the deduplication process:

Deduplication with a simple S2S postback

This method works for the cases where your affiliate network/advertiser/partner can send some unique value for each conversion in a postback.

Expand to learn how to deduplicate events with S2S postback

RedTrack allows you to use the event ID for this purpose. Follow these simple steps:

1. Generate the postback.

Important!

Most affiliate networks support at least one unique value on their side (conversion id, transaction id, etc.). Ask your account manager for advice if you cannot find it.

Postback example:

https://club.rdtk.io/postback?clickid={sub1}&sum={price}&sub2={transaction_id}

The subx role will be Facebook Event ID

2. Establish the proper S2S conversion tracking with your affiliate network using this postback.

3. Once you start receiving these unique values, RedTrack will automatically send them to Facebook attached to each conversion. After that, Facebook will check for the event value in the received conversion information and attribute it accordingly.

Note!

Make sure you have integrated your Facebook account with RedTrack.

Deduplication with GTM

This method works for the cases when you have no option to receive any unique parameter from elsewhere but you can place a piece of code on your “Thank you” page. You will need to have an option to generate it on your side.

Expand to learn how to deduplicate events with GTM

1. Make sure you already have a GTM account and have your domain connected.

2. Create a variable that will generate a unique value for each conversion.

Note!

We use a clickid value in that case as it is always unique

2.1 go to Variables → new user-defined variable

2.2 check if you already have rtkclickid-store variable. If there is none add a new user-defined variable:

Name: rtkclickid-store → Variable type: 1st party cookie → cookie name: rtkclickid-store:

3. Add your FB pixel script (you can find it on the FB side. This guide will help you) to the GTM, and use the variable from step 2 as a value for FB eventID:

Remember to update the pixel with value and currency for Facebook to read it:

4. Now, you need to set the variable for your deduplication inside RedTrack. To do that go to the Offer source → subs → choose any of the subs to be your target variable → set the alias for it to be eventID, macro {{rtkclickid-store}} and the role:

5. Add eventID={{rtkclickid-store}} to the tag that sends conversion to RT. This tag contains your RedTrack S2S postback URL. You can find more information on the setup here (Postback trigger).

6. Use the same trigger to fire conversion for your Facebook script and RedTrack image tag:

Note!

Make sure to remove the Facebook pixel from your website code and place it on the website using the GTM.

Special case: Shopify, Woocommerce

Unfortunately, none of the above-mentioned solutions (via s2s postback or GTM) will suit you if you use Shopify, Woocommerce or some other third-party solution inside Shopify / Woocommerce plugins. In that case, if you notice the duplication on the Facebook part and it bothers you so you need to set the deduplication process, contact the plugin’s support or clarify with your manager if there is an opportunity to modify / edit the plugin so that it can fire the same eventid as we keep in the first party cookie, meaning rtkclickid-store (user’s clickid) and act depending on the provided answer:

  • if it’s possible to edit the plugin this way, the issue is solved and you set the deduplication process via any of the possible ways.
  • if it’s not possible to edit the plugin this way, it means that you cannot set the deduplication process with the help of the standard solutions. Nevertheless, we offer you the following workaround:

a. for the period of one week run the traffic using only the needed plugin;
b. then in course of the second week pause the plugin and use RedTrack API;
c. finally, compare the received data (from a and b) and decide which scenario is the best for your concrete case. Or you may decide to go with the duplication if this doesn’t influence you business whatsoever.

Leave a Comment

Share this Doc
Contents
Chat Icon Close Icon