Before starting the implementation of the Meta CAPI, ensure you have the following requirements:
• TAGGRS Setup: Ensure your TAGGRS server container is deployed. You can follow our implementation guide to have it done easily.
• API Access token: Generate in Meta Events Manager under Conversions API → Settings.
• Pixel ID: Locate in Meta Events Manager under Data Sources.
• Data Layer Configuration: Ensure your website sends data to the server GTM container via GA4.
go to Templates and select Search Gallery.
Facebook Conversion API from stape and click Add to workspace.
Create a new tag in your server container and select Facebook Conversions API as the tag type.
Configure the essential settings:
Choose between the following 2 options.
• Inherit from client: Automatically matches GA4 events to Meta standard events
• Override: Gives you full control over event configuration and payload customization
Set to Website for web-based conversions.
Enter your access token or use a variable like {{Meta Access Token}}.
Enter your Pixel ID or use a variable like {{Meta Pixel ID}}.
Check Generate _fbp cookie if it not exist for better event matching.
Set up User Data and Custom Data sections for enhanced tracking.
The Stape template automatically handles most data mapping, but you can enhance it with custom variables:
Variable type
Variable name
Purpose
Data Layer Variable
Event Name
Maps to event_name from client
Data Layer Variable
Transaction ID
Maps to ecommerce.transaction_id
Data Layer Variable
Purchase Value
Maps to ecommerce.value
Data Layer Variable
Currency
Maps to ecommerce.currency
Data Layer Variable
User Email
Maps to user_data.email_address
Data Layer Variable
User Phone
Maps to user_data.phone_number
Create a Custom trigger that fires when your data client processes events. Set the trigger condition:
The stape template automatically maps common GA4 events to Meta standard events:purchase → Purchaseadd_to_cart → AddToCartbegin_checkout → InitiateCheckoutpage_view → PageView
Enable Consent Settings if using consent management:
• Configure to send data only when marketing consent is granted.
• Ensure your web container passes consent status to the server container.
The template handles automatic event deduplication when configured with matching event IDs between client-side and server-side implementations.
graph.facebook.com in POST - 200.