METAGUIDES
Meta Pixel and Conversions API on a casino landing page: consent first
KEY POINTS
- Before any setup: Meta allows online gambling ads only with its prior written permission and does not allow targeting people under 18.
- In the EU, a tracking pixel needs consent before it runs: the ePrivacy rule on storing and reading information on a device covers pixels, not only cookies.
- Run the Conversions API alongside the Pixel, as Meta recommends; give both the same event ID so Meta counts the event once.
- Hash customer data such as email and phone before sending; never hash IP address, user agent, fbc or fbp. Keep the access token on the server.
Updated 3 November 2026 · 4 min read
Meta campaigns need the Meta Pixel on the landing page and, for reliable numbers, the Conversions API on your server. For a casino both come with conditions: Meta’s own permission, cookie consent and careful handling of player data. Here is the order we follow when we set this up on landing pages, as of November 2026.
1. Permission to advertise comes first
Meta allows ads that promote online gambling and gaming only with its prior written permission. To get it, you show that the activity is licensed by a regulator or otherwise lawful in each market you want to target. Ads may not target people under 18, and not every type of gambling can be approved in every territory. Apply before you build the campaign, not after.
2. Consent before the Pixel
In the EU, storing or reading information on a visitor’s device is allowed only with consent, unless it is strictly necessary for the service. The EDPB’s guidelines on Article 5(3) of the ePrivacy Directive confirm that this covers similar technologies, including tracking pixels and URL tracking, not only cookies. The Court of Justice held in Planet49 that a pre-ticked box is not valid consent.
How we set it up on landing pages:
- The Pixel code is not loaded at all until the visitor accepts. No early loading, no “loading but paused”.
- Accept and decline are equally easy, on the first layer of the banner.
- The choice is remembered in a first-party cookie, so the banner does not come back on every page.
- The banner never covers the call to action. If the button would sit under it on the current screen, the banner moves to the top.
If you prefer to load the Pixel early, Meta’s consent API can hold it: fbq('consent', 'revoke') stops sending events and fbq('consent', 'grant') resumes. Meta notes that revoke has to be called on every page.
3. Conversions API alongside the Pixel
The Conversions API sends events from your server to Meta. On a casino landing page this is where the important events come from: registrations and deposits happen in the casino, and the casino platform reports them to your server in postbacks (see casino traffic tracking). Meta recommends running the Conversions API alongside the Pixel, not instead of it.
4. Count each event once
When the Pixel and the Conversions API report the same event, Meta deduplicates them if both carry the same event ID (eventID in the Pixel, event_id in the API) and the same event name, and arrive within 48 hours. Generate the event ID once and send it through both paths. Server events may be at most 7 days old when they reach Meta.
5. Player data: hash what must be hashed
- Hash customer information before sending it: email, phone, first and last name, date of birth, gender, city, state, postcode and country. Meta’s examples use SHA-256.
- Do not hash the client IP address, the user agent and the
fbcandfbpvalues. Capturefbcandfbpon the landing page together with the click, so the server can send them later with the deposit. - Send only what the event needs. Every extra field is personal data you have to justify.
6. Consent applies to server events too
Consent is not only a browser question. The Court of Justice found in Meta Platforms v Bundeskartellamt that personalised advertising cannot justify Meta’s processing of data collected outside Facebook as a legitimate interest without the user’s consent. The ruling concerns Meta’s own processing, but the cautious reading for an operator is simple: send server events for EU visitors only if they accepted advertising cookies, and record that choice with the click. Ask your lawyer how this applies to your markets.
7. Keep the access token on the server
The Conversions API token gives write access to your ad account data. Keep it in the server’s secret store, never in page code, a repository or a chat. If it was ever exposed, revoke it and issue a new one.
Checklist
- Meta’s written permission for gambling ads, per target market.
- The Pixel loads only after consent; decline is as easy as accept; the banner never covers the button.
- Conversions API for registrations and deposits, alongside the Pixel.
- One event ID for both paths; server events less than 7 days old.
- Customer data hashed; IP, user agent, fbc and fbp sent as they are.
- Server events only for visitors who consented.
- The access token only in the server’s secret store.
We set up landing pages with consent, the Meta Pixel and server-side conversions for operators’ campaigns, also for casinos that do not run on our platform. See landing pages for paid traffic.
Frequently asked questions
Can a casino advertise on Facebook and Instagram?
Only with Meta's prior written permission. Meta asks for evidence that the gambling activity is licensed or otherwise lawful in each market you target, and does not allow targeting people under 18.
Can the Meta Pixel load before the visitor accepts cookies?
For visitors in the EU, no: storing or reading information on the visitor's device for advertising needs prior consent, and the EDPB confirms this covers tracking pixels. The safe setup loads the Pixel only after consent.
Why use the Conversions API if the Pixel already works?
The Pixel runs in the browser and loses events there. The Conversions API sends events from your server, for example registrations and deposits reported by the casino platform. Meta recommends using both together.
How does Meta avoid counting an event twice?
When the Pixel and the Conversions API send the same event with the same event ID and event name within 48 hours, Meta keeps one of them.
Which data must be hashed for the Conversions API?
Customer information such as email, phone, name, date of birth, city and country must be hashed. Client IP address, user agent and the fbc and fbp values must not be hashed.
This page is general information, not legal advice. Requirements, timelines and procedures are set by the regulator and change over time; confirm them for your case with a qualified lawyer.
SOURCES
- Meta Transparency Center — Online Gambling and Games · accessed 3 Nov 2026
- EDPB — Guidelines 2/2023 on the technical scope of Art. 5(3) of the ePrivacy Directive, v2.0 · 7 Oct 2024
- CJEU — Planet49 (C-673/17), press release No 125/19 · 1 Oct 2019
- CJEU — Meta Platforms v Bundeskartellamt (C-252/21), press release No 113/23 · 4 Jul 2023
- Meta for Developers — Meta Pixel: cookie consent (GDPR) · accessed 3 Nov 2026
- Meta for Developers — Handling duplicate Pixel and Conversions API events · accessed 3 Nov 2026
- Meta for Developers — Customer information parameters · accessed 3 Nov 2026