Meta Conversions API on Static Sites: The Complete Setup
By Rome Thorndike
Why CAPI Matters Now
Browser-based pixel tracking has been losing reliability for years. iOS App Tracking Transparency, Safari Intelligent Tracking Prevention, ad blockers, and regulatory cookie restrictions have all eaten into pixel coverage. Meta itself estimates that browser pixel alone now misses 15-40% of conversions, depending on audience.
The fix is server-side tracking through Meta Conversions API (CAPI). Events fire from your server, not the browser, which bypasses most of the blocking mechanisms. The result: more accurate event reporting, better optimization for ad campaigns, and a measurable lift in attributed conversions.
For dynamic sites with a backend, CAPI setup is straightforward. For static sites, the question is: where does the server-side code run? The answer depends on where you host.
Option 1: Cloudflare Workers
Cloudflare Workers run JavaScript at the edge in response to HTTP requests. They are free for the first 100,000 requests per day, which covers most marketing sites comfortably. They are also fast, with response times typically under 50ms.
The setup pattern: deploy a Worker that accepts POST requests from your form submissions and lead actions. The Worker validates the request, hashes the email and phone numbers as Meta requires, and forwards a properly formatted event to the Meta CAPI endpoint. Your site sends a fetch request to the Worker URL when a conversion happens.
This pattern keeps your Meta Pixel access token off the client side (security) and eliminates the dependency on browser-based tracking. It works regardless of cookie consent state because the user has already submitted their form, indicating active interest.
Option 2: Serverless Functions (Vercel, Netlify, AWS Lambda)
If you host on Vercel, Netlify, or AWS, serverless functions are the equivalent pattern. Deploy a single function that handles CAPI events. Point your form submissions and key conversion events at the function URL. The function authenticates with Meta and forwards the event server-side.
Vercel functions are free for the first 100K invocations/month. Netlify Functions are free for the first 125K. AWS Lambda is free for the first 1M. All three are well-suited for CAPI on static sites.
Option 3: External Service (Stape, Tagging Server)
If you do not want to write code, services like Stape provide hosted server-side tagging that supports Meta CAPI alongside other platforms. You configure the events in a UI, get an endpoint, and call it from your static site forms. The trade-off is monthly cost ($20-100/mo depending on volume) for less engineering work.
This is a good option for marketing teams without a developer. For teams with any technical capability, Cloudflare Workers or serverless functions are cheaper and offer more control.
What to Send to CAPI
The minimum CAPI event includes: event name (Lead, Purchase, CompleteRegistration, ViewContent, etc.), event time, event source URL, action source (typically "website"), and user data (hashed email, hashed phone, IP address, user agent, Facebook click ID if available, Facebook browser ID).
Email and phone must be SHA-256 hashed before sending to Meta. The hashing is the most common implementation mistake. Use a vetted library or follow Meta's documentation exactly.
Higher-quality events also include: external_id (your CRM contact ID), customer_value, currency, and content_ids. The more matching signals you send, the better Meta's Event Match Quality score, and the better optimization performance.
Pixel + CAPI Together (Deduplication)
The recommended pattern is to fire both browser pixel and CAPI for the same conversion event. Meta deduplicates the events on its end using a shared event_id. This maximizes coverage (browser catches some events CAPI misses, CAPI catches some events browser misses) without double-counting conversions.
To deduplicate properly: generate a unique event_id when the conversion happens, pass it to both the browser pixel call and the CAPI call. Meta will see the same event_id from both sources and merge them.
Why Static Sites Win Here
Adding CAPI to a WordPress site requires installing yet another plugin, managing the plugin updates, and praying it does not conflict with your other 14 plugins. Adding CAPI to a static site means deploying a Cloudflare Worker once and pointing your forms at it. Total setup time: 30-60 minutes.
Static sites also avoid the consent management mess that complicates CMS-based CAPI. Without cookies, without pixels firing on every page load, the consent layer simplifies dramatically. Form submissions and explicit conversion events are first-party intent, which has clearer legal standing than cookie-based tracking.
If you need help setting up CAPI on a static site, we ship CAPI setups as part of every site we build. New sites include browser pixel + CAPI deduplication from day one. Pricing starts at $3,000. See services or contact us to scope the project.
Frequently Asked Questions
What is Meta Conversions API?
Meta Conversions API (CAPI) is a server-to-server tracking method that sends conversion events directly from your server to Meta, bypassing the browser. It complements browser-based Meta Pixel tracking and recovers conversions that browser pixels miss due to ad blockers, ITP, ATT, and consent restrictions.
Do I need both Meta Pixel and CAPI?
For most use cases, yes. Meta recommends running both with proper deduplication via shared event_ids. Browser pixel catches events that fire instantly. CAPI catches events that browser pixel misses due to blockers. Together they maximize event coverage without double-counting.
How much does CAPI cost on a static site?
Free, in most cases. Cloudflare Workers offer 100K free requests per day. Vercel, Netlify, and AWS Lambda offer free tiers that cover marketing site volume. The only cost is implementation time (typically 30-60 minutes for a developer who has done it before).
Will CAPI improve my Facebook ad performance?
Usually yes. Meta uses event quality and event volume to optimize ad delivery. Sending more events with better quality (full user_data parameters, accurate event_time, server-side event source) improves Meta's ability to find similar audiences and convert your campaigns more efficiently. Most accounts see 10-25% lift in attributed conversions after CAPI implementation.
Ready to Fill Your Next Event?
We build the page, set up the pixels, and run the ads. You run the event.