I made this script to demo its implementation via FB Python Business SDK. Little details on the API schema, which accepts four types of params - main body params (data and test_event_code), User Data params (mostly hashed identities of users), Server Event params (event_time, event_name, user_data, opt_out, event_id) and Custom Data params (value, currency, content_id, content_type). Now what does it do?
Allows Facebook to understand who made a particular event which is useful to measure and if not opted out, use this data for marketing optimisation
Allows Facebook to gear their ads towards users who are more likely to make that particular event, purely driven my machine learning models
There are other ways in which Facebook accepts events such as Facebook Pixel (which is a JS SDK to send events directly from browser), Facebook Mobile SDK (mobile equivalents of Pixel) and some Mobile Measurement Partners (who expertise in sending user events to multiple channels like Google, Facebook all in just one implementation). In a nutshell, all modes of sending events basically achieve the same thing, send a certain events to Facebook and expect the machine learning models to optimize ads delivery to certain users who will easily click and perform the target conversion.
Coming back to Server Side Events, because it is sent from Servers directly there are little tools to debug the API calls. So, Facebook allows certain ways in which the implementation correctness can be judged.
python API Facebook