I get an error from Facebook:
Purchase Event Missing Some Deduplication Parameters You're sending
Purchase events through both your pixel and the Conversions API, but they're not being deduplicated properly because not enough of these events are receiving an event_id parameter. Event instances sent without an event_id parameter cannot be deduplicated.
Add an event_id parameter to all Purchase events that you're sending from both your pixel and the Conversions API. To add an event_id parameter to the events you're sending through the Conversions API, you can use the Payload Helper tool on the Facebook for Developers site to validate that your payload is set up correctly. To add an event_id parameter to the events you're sending through your pixel, go into your website's source code and add an event_id parameter to each of your Purchase event instances.
But I am sending event_id in my pixel event for Purchase!
For example, to send external_id through the Pixel, use the following code: fbq('init', 'PIXEL_ID', {'external_id': 12345}); Read about the other parameters you can pass with Pixel in the Advanced Matching documentation.
Event ID and Event Name (Recommended) For this approach, the event_id parameter is added to your events from both the Conversions API and the browser Pixel. The event_id parameter is an identifier that can uniquely distinguish between similar events.
Now, click the “Add Events” drop-down and select “From a New Website.” Choose the option to “Install code manually.” Finally, click the button to “Copy Code.” You will want to paste that code before the closing HEAD tag of every page of your website (not just pages where conversions occur).
The correct way to send event_id on the server with the Conversions API is at the same level as event_name
and not inside user_data
or custom_data
.
However with the pixel on the client you need to send it like this as a third parameter to fbq.
fbq('track', 'Purchase', {value: 12, currency: 'USD'}, {eventID: 'purchase.123456'});
Note it is called eventID
when sent from pixel and not event_id
. Despite the error message calling it event_id
! At time of writing this was the only page I could find this third parameter described.
You can verify in the events manager tool by clicking 'View Details' for an event and then looking at 'Event Deduplication'. It will confirm the parameter is received from the pixel. It may not show here for several hours, or even until the next day - even if you're seeing events being received in real time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With