Facebook Conversion API Setup with GTM: Client & Server-Side Implementation Guide

Frequently Asked Questions
Common questions about "Facebook Conversion API Full Setup with GTM Client + Server-Side (+ Consent Mode & Deduplication)"
Facebook Conversion API (CAPI) is a server-side tracking solution that sends conversion data directly from your server to Meta, making it less vulnerable to ad blockers and browser limitations. Using it alongside the Meta Pixel provides redundancy, improves tracking accuracy, and helps maintain measurement capabilities even as third-party cookies are phased out.
Implement a unique event ID generator in your client-side GTM, then pass this ID to both the Meta Pixel (via advanced settings) and as an event parameter in your GA4 event tag. This ID will be passed to your server-side setup and used by Meta to identify and deduplicate identical events coming from both sources.
Implement consent checks on both client and server sides: use consent mode triggers for client-side tags, and create a server-side trigger that checks for consent parameters in the request URL (looking for ad_storage=granted). This ensures you only send data to Meta when users have explicitly consented to marketing cookies.
You need a client-side Meta Pixel implementation, a server-side GTM container with transport URL configured, a Meta Conversion API tag in your server container, consent checks on both client and server sides, and a unique event ID implementation for deduplication. Additionally, you'll need your Meta Pixel ID and an API access token from Meta Events Manager.
EU-based server hosting like gdpr-server-tracking.eu provides stronger GDPR compliance by keeping data within EU jurisdiction, eliminating concerns about international data transfers. Unlike cloud providers, dedicated EU-based hosting offers more control over data processing, better privacy protection, and can help avoid potential regulatory issues while still enabling the same powerful server-side tracking capabilities shown in the video.
Use the test event code from Meta Events Manager in your server-side tag configuration, then check the Events Manager dashboard to confirm events are being received with matching event IDs from both sources. You can also use browser developer tools to inspect network requests and the GTM preview mode to verify both client and server-side tags are firing properly with consent.
Yes, while the video demonstrates implementation using Google Cloud Platform, you can use alternative hosting solutions like gdpr-server-tracking.eu which offers EU-based server-side GTM hosting. This approach can be particularly beneficial for European businesses concerned with GDPR compliance, as it keeps data within EU jurisdiction while providing the same technical capabilities for implementing the Facebook Conversion API.
Since server-side GTM can't directly access consent states, you need to check for consent parameters in the incoming request URL from the client. This is done by creating a query parameter variable that extracts the Google Consent State (GCS) parameter, then using a regex table variable to check if ad_storage is granted, and finally creating a trigger that only fires when this condition is met.