The Best Way to Set Up Facebook Conversions API Pixel and Your Meta DataSet in 2025


The Meta Conversions API (CAPI) is a powerful tool for improving the accuracy of event tracking and ad performance.
This tutorial explains how to implement CAPI using Google Tag Manager for websites that don’t support direct integration, such as ClickFunnels, GoHighLevel, or other custom platforms.
This guide includes a browser and server-side setup, ensuring compatibility and scalability for varying needs.
What is Meta Conversions API?
Unlike browser-side tracking, which can be hindered by cookie restrictions and ad blockers, server-side tracking ensures data is sent directly to Meta’s servers. This enhances data reliability and accuracy.
Why Use Google Tag Manager?
Google Tag Manager (GTM) simplifies the process of managing and deploying tracking tags across your website. It acts as a central hub for code snippets, offering flexibility to set triggers and variables for events like page views, form submissions, and purchases. GTM supports both browser-side and server-side tagging, making it ideal for implementing the Facebook CAPI.
Step-by-Step Guide to Setup
In the video guide above, you will be walked through the specific steps to setup the Facebook CAPI
1. Preparation
- Ensure you have access to your website’s codebase or content management system (CMS).
- Create accounts for Google Tag Manager and State.io.
- Get the Meta Dataset ID and access token from Facebook Events Manager.
2. Create Containers in Google Tag Manager
- Log into GTM and create a web container for browser-side tracking.
- Create a server container for server-side tracking.
- Install GTM on your website using the GTM scripts for the header and body sections.
3. Configure State.io
- Create an account on State.io and configure a custom subdomain for improved first-party cookie compatibility.
- Add the required DNS records to your domain provider to verify the subdomain.
- If required, you can use Google Cloud Platform instead of Stape.
4. Set Up Events
- Define triggers in GTM for events such as page views, leads, and schedules.
- Create variables to store the Pixel ID and server URL.
- Use templates for custom tags to manage Facebook CAPI events.
5. Test Your Configuration
- Use Tag Assistant and Facebook Pixel Helper extensions to test the browser-side setup.
- Preview the server container to confirm events are firing correctly.
- Verify events in Facebook Events Manager to ensure data accuracy.
Best Practices for Implementation
- Use Unique Event IDs: Ensure each event has a unique ID to prevent duplication in Facebook Ads reporting.
- Implement Advanced Matching: Send hashed customer data (e.g., email addresses) for improved attribution.
- Optimise for Scalability: If your website handles significant traffic, consider switching to platforms like Google Cloud for more cost-effective server-side tracking.
- Monitor Data Privacy Regulations: Ensure your tracking setup complies with privacy laws like GDPR and CCPA.
Benefits of the Setup
- Improved Attribution Accuracy: Server-side tracking ensures that all data, including blocked cookies, are captured.
- Enhanced Ad Performance: With better data, Meta can optimise campaigns more effectively.
- Cost-Effective Solutions: Platforms like State.io offer free and affordable options for server-side tagging.
Conclusion
Setting up the Facebook Conversions API with Google Tag Manager provides a robust solution for accurate event tracking and enhanced ad performance. While the process requires technical expertise, the benefits far outweigh the effort, especially for businesses aiming to maximise their return on ad spend. With proper configuration and testing, this setup can significantly improve data reliability and campaign outcomes.
Want more like this?
Want more like this?
Insight delivered to your inbox
Keep up to date with our free email. Hand picked whitepapers and posts from our blog, as well as exclusive videos and webinar invitations keep our Users one step ahead.
By clicking 'SIGN UP', you agree to our Terms of Use and Privacy Policy


By clicking 'SIGN UP', you agree to our Terms of Use and Privacy Policy
Other content you may be interested in
Categories
Categories

Want more like this?


Want more like this?
Insight delivered to your inbox
Keep up to date with our free email. Hand picked whitepapers and posts from our blog, as well as exclusive videos and webinar invitations keep our Users one step ahead.
By clicking 'SIGN UP', you agree to our Terms of Use and Privacy Policy