If we go back to our Facebook pixel on WFIOThiio, we’ll notice that below the Facebook CAPI token another switch exists with the label Facebook Test Mode Disabled, as you can imagine if we change the state of this switch to Enabled, it is going to help us testing our integration. Let’s turn the switch to enabled and another input will be displayed below the switch asking for a test code.
...
In order to test these events we need to keep an eye on the Test Events tab from our Facebook’s events manager, every time one of the events is triggered it should be listed and very important the event must be Deduplicated.
Events Deduplication
Deduplication is a concept that facebook defines as a process for avoiding the duplication of events; it is important to remember that CAPI works together with the Facebook pixel, meaning that each event is going to be reported by the browser and also from the server side. If you want to know more about deduplication please refer to the Facebook’s official documentation.
Let’s explain how the deduplication works with the following example, imagine we have our WFIO Thiio shop and we visit the product listing page, after the page loads we select a product from the list and we add it to the cart.
...
A few seconds later, the same Add to cart event will be reported again but now the Received From column will have a value of Server indicating that the event was received from the server as shown in the image below. Following Facebook’s CAPI best practices, every time a new event is reported, WFIO Thiio adds a Unique Event ID, this ID is will be the same for the event reported from the browser and from the server, this is how Facebook detects that the event has been sent twice and it will be deduplicated (counted only once).
...