Why is FB/Meta Conversions API not deduplicating my events even though they have the same name and eventID?

1.2k views Asked by At

I send the same event to Facebooks Event Manager from FB pixel and Conversions API. I have made sure that the event name and eventID are the exact same, and that the server event is sent after the browser event.

The events are not deduplicated in Event Manager. I have looked through the documentation but canĀ“t find anything missing.

I have tried on several different types of events and waited more than 24 hours.

The Pixel event is sent like this;

    fbq('track', 'PageView', {test: 'test'}, {eventID: 'PageView'+uniqueid});

And i use Facebook Business SDK for PHP to send server events;

Api::init(null, null, $access_token, false);


$user_data = (new UserData())
    ->setClientIpAddress($_SERVER['REMOTE_ADDR'])
    ->setClientUserAgent($_SERVER['HTTP_USER_AGENT']);

$event = (new Event())
    ->setEventName($eventname)
    ->setEventId($eventid)
    ->setEventTime(time())
    ->setEventSourceUrl($_SERVER['HTTP_REFERER'])
    ->setUserData($user_data);

return array($event);
}

$request = (new EventRequest($pixel_id))
->setTestEventCode('TESTXXXX')
->setEvents(create_events($eventid, $eventname));
$response = $request->execute();

Here is an example of an event that is not deduplicated;

Example of two events

1

There are 1 answers

0
superhenke On

It seems to be working fine when using a public server instead a local one.

Then i also get the users IP-address in the server event. I guess the IP address differs between the pixel and the PHP variable $_SERVER['REMOTE_ADDR'] locally (127.0.0.1) and that is what prevents the server event to be deduplicated.