If you offer Meta Pixel setup as part of your tag management services, you may want to consider adding Conversions API functionalities. Integration with the Conversions API allows your customers to send web events to Meta directly, without having to rely on browser pixel events.
Before starting, it is important to understand the relationship between server events and the Meta Pixel. Server events are sent via the Conversions API and used in measurement, reporting, and optimization in the same way as browser pixel events.
If sending browser pixel events is like sending mail via airmail, then sending server events is like sending mail via freight. They are both mechanisms to transport the package (data about an event) to a destination address (a pixel ID). So, we highly recommend that you build the Conversions API integration on your platform as an extension of your current Meta Pixel offering (instead of a separate plugin or service) for the following reasons:
Once your platform is integrated with the Conversions API, we recommend sending the same web events via browser and server. This redundancy helps ensure signal reliability. Events that previously could have been lost on the browser side, for a variety of network reasons, are now captured via the Conversions API.
To send events via browser and server, you must correctly set the same event_id
for corresponding events. This allows Facebook to properly deduplicate your events.
To start offering Conversions API as a platform, your app needs to go through App Review. During that process, you must request following access level, feature and permissions:
ads_management
, pages_read_engagement
, and ads_read
If this is your first time using the Conversions API, follow these steps to create a Business, Meta app, Meta Pixel, and system user. Then, you will be able to use your system user's access token to send server events via the Conversions API.
Once you have successfully sent a server event to your own Meta Pixel, you have options on how to send events on behalf of your clients.
You must first request authorization to send events on behalf of your clients. You have the following authentication options:
With this option, Facebook Business Extension (FBE) returns all the necessary information needed to send events on behalf of the client via the following process. FBE provides an endpoint to retrieve system user access tokens created in the client’s Business Manager. This process includes permissions to send server events and is done automatically and in a secured way.
The endpoint requires a user access token as an input parameter. For new FBE users, call this endpoint to fetch the system user access token after you finish setting up the FBE. Existing users need to ask for re-authentication before calling the new API endpoint.
With this option, you must have your client manually create a system user access token via the Conversions API inside the Pixel Settings. You can then send events to the advertiser’s pixel with that token.
A system user or an admin system user must install the app that will be used to generate the access token. With this setup, your app is allowed to call APIs on behalf of this system user or admin system user.
Follow our Get Started documentation and request a system's user token from your advertiser. Remember to use your own Meta Pixel and access token for testing.
With this option, the client shares their Meta Pixel to the partner via Business Manager settings or via the API. Then, you can assign the partner system user to the client pixel and generate an access token to send server events.
partner_agent
FieldTo attribute Conversions API events to your platform, use the partner_agent
field. This allows you to set your own platform identifier when sending events on behalf of a client. Work with your Facebook Representative to agree on an identifier for your platform. Then, send it with each server event.
If your platform identifier is datapartner
, this would be a sample purchase event payload sent on behalf of your client:
{ "data": [ { "user_data": { "em": "8159ea0e33c51a774b83104ee562784f9b1836c852102046e4bd8385706fe7ca" }, "event_name": "PageView", "event_time": 1579645238 }, { "user_data": { "em": "8159ea0e33c51a774b83104ee562784f9b1836c852102046e4bd8385706fe7ca" }, "custom_data": { "currency": "USD", "value": "50" }, "event_name": "Purchase", "event_time": 1579645238 } ], "partner_agent": "datapartner" }
Sending events sent via the Conversions API is just like sending events via the Meta Pixel. The only difference is that the event is sent via the server, instead of the browser. So, why make an effort to integrate with the Conversions API? Here are some important use cases:
If someone uses an advertisers’ website to sign up for a credit card, they can send events such as ViewContent, Application Start, and Application Submit via the browser to the Meta Pixel. However, the end user still needs to be approved for this credit card. The Approval event happens offline and cannot be sent via browser. To register this final step, the advertiser can send the Approval via the Conversions API.
Browser side events can be lost for many reasons:
These examples can all be mitigated by sending events via the Conversions API.
Many advertisers have expressed concerns about sharing data via the browser when that data could be seen or inspected. This can be mitigated by sending data via the Conversions API.
For example, advertisers may want to send data like profit margin or lifetime value (LTV) along with a purchase
event. This way, ads can be optimized towards a specific type of customer.
Since browser events are always vulnerable to obstacles, we recommend that you only send events collected from the Conversions API sources. For example, if:
the data is open to the browser-side risks.
To take full advantage of the Conversions API, no part of the data flow should be reliant on the browser.
We recommend that you provide advertisers with a way to test this connection on your own platform.
200
return code.Meta tries to deduplicate identical events sent through the Meta Pixel and the Conversions API. We determine if events are identical based on their event_id
and event_name
. For more information, see Handling Duplicate Pixel and Conversions API Events.
The external_id
parameter is a string that represents a user on an advertiser's system. These IDs help improve ads attribution and create audiences.
You can send external_id
s via browser or the Conversions API, but you must be consistent across channels. For example, if you send a browser pixel event with external_id
set to 123
, your server event for that same user should also have external_id
set to 123
.