Facebook tracking

Facebook event deduplication

Important note! 

Out tech team has prepared a step-by-step guide on how to do a Facebook event deduplication with RedTrack, you can find it below.

Since it is an advanced tutorial, it is not covered by RedTrack Support. Knowledge of web design languages such as HTML, CSS, 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 about the difficulties we may face using both the pixel and the API conversion postback with Facebook.

And we still suggest using one method only. However, RedTrack allows you to solve the event duplication issue.

There are 2 possible ways to avoid the event deduplication:

  1. Send different types of events via browser and server
  2. Set the deduplication process

When you send different events via browser and server, no need to worry about the deduplication as everything is fine.

But when you want to send the same events both via pixel and browser, you will have to set the deduplication process. Otherwise, you will miss those events as Facebook will remove them automatically.

There are 2 ways of setting the deduplication process:

  1. Via the simple S2S postback.
  2. Via the GTM

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.

How can this be done?

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

1. Generate the postback.

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.

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.

The following guide is not covered by RedTrack Support. Knowledge of web design languages such as HTML, CSS, JavaScript may be required. We suggest hiring an expert if you are not comfortable proceeding with the following guide on your own.

How can this be done?

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.

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

Go to Variables → new user-defined variable → 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

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

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

Related Articles