Setting Up the Meta CAPI Tag
As explained in our documentation, implementing Meta CAPI has become a crucial step for advertisers. It's currently the best way to optimize the volume of conversions attributed to your ad campaigns. If implementing Meta CAPI seems complex, rest assured, the tag created for you by Addingwell will make the process much easier! Follow our detailed methodology for an effective Meta CAPI setup.
Importing the Tag
Download the Tag
Click here (opens in a new tab) to download the Meta Conversion API tag and click on the download icon to retrieve the file.
Import the Tag into sGTM
Next, go to the Templates tab of the server container, and in the Tag templates section, click on New.
Then click on the three small dots in the top right corner and select Import.
Save the Newly Imported Tag
Then select the recently downloaded template.tpl file and click Save.
Configuring the Tag
Create a new tag in Google Tag Manager Server-Side and select the newly created Meta CAPI tag.
To configure the tag, two pieces of information are required:
-The Meta Pixel ID to which the data will be sent.
-The Access Token to communicate with the CAPI conversion API
Once you've obtained the access token and pixel ID, configure the Meta CAPI tag.
Event Name Setup Method
Setup Method | Description |
---|---|
Inherit from client | Instructs the tag to match the GA4 events received from the client-side container with Meta's standard events. Any GA4 event not listed in the matching table will be sent as a custom event to Meta. |
Override | Manually map the GA4 events to what should be sent to Meta. Choose to send either a standard event or a custom event. |
API Access Token
Enter the access token obtained from the pixel settings here.
Facebook Pixel ID
Enter the pixel ID obtained from the event manager here.
Test event ID
You can enter the event manager's test code here, only for testing the event data sent to Meta.
It is not recommended to keep the Test ID in the Meta Conversion API tag in production. Be sure to remove it before publishing your server container.
Send pixel request
This checkbox allows sending a request to the pixel (purple arrow in the diagram below) with the same event_id as the request sent to the conversion API, thereby facilitating the deduplication mechanism. This aligns with Meta's recommendations for ad tracking.
With this Addingwell tag, there's no need to have Meta tags in the client container; only the server container tag is required.
Triggering the Tag
Trigger the Meta CAPI tag on relevant GA4 events using the tag's matching table.
For example, for an e-commerce site, the following events are commonly used:
Event Name |
---|
page_view |
view_item |
add_to_cart |
begin_checkout |
add_payment_info |
purchase |
This list of events is, of course, not exhaustive and depends on your specific situation.
For optimal organization, create a Lookup Table variable configured as follows:
In the Meta CAPI tag, create a custom trigger to verify that the events come from GA4 (Client Name = GA4) and that the previously configured conversion table returns true
.
Remove Your Facebook Pixel Tags from Your GTM Client Container
If you followed our advice and are correctly triggering the Facebook Pixel from the Meta CAPI tag server-side, it is crucial to remove (or at least pause) your Facebook Pixel tags on the GTM client container. Similarly, if your Facebook Pixel was not set up via GTM but hardcoded into your site by your developers, be sure to ask them to deactivate the Facebook Pixel in the site’s code. If you mistakenly continue sending data to your Facebook Pixel from your GTM client (or directly from your site), your data will be sent twice: once from the server-side tag and once from your client-side tags!
Next step
You have completed the setup of Addingwell's Meta CAPI tag. It’s time to check received data.