Meta Pixel: how to install it without breaking Quebec's Law 25
The code Meta asks you to paste loads the pixel before visitors agree to anything. Here is the setup to use in Quebec, and how to check it yourself.

You are about to run your first Facebook or Instagram ads, and Meta asks you to install its pixel on your website. Events Manager hands you a block of code to paste into every page. Technically, it takes two minutes. If your business serves people in Quebec, that copy-paste creates a problem most owners never notice.
What the pixel actually does
The pixel is a small script provided by Meta. Once loaded, it sends Meta a PageView event for every page viewed, plus any actions you choose to track. The most useful one for a service business is Lead, which Meta's documentation describes as a completed sign-up: a quote request or a contact form sent.
Those events do two jobs. You learn how many inquiries actually come from your ads. And Meta can show your ads to people who look like the ones who already contacted you. That is why the pixel is worth installing.
Why Meta's code is not enough in Quebec
Meta recommends placing its code in the head of every page. The pixel therefore loads the moment a visitor lands, before they have had any say.
Quebec's private-sector privacy act, as amended by Law 25, covers exactly this situation. Section 8.1 requires a business that collects information through a technology able to identify, locate or profile a person to tell them beforehand, along with the means to turn those functions on. Quebec's privacy regulator, the Commission d'accès à l'information, specifies that such functions cannot be on by default: the person has to switch them on.
Meta says much the same in its Business Tools Terms: where the law requires consent for cookies, you are responsible for obtaining it before its tools run. The raw snippet, pasted as is, does not do that.
We are not lawyers, and the Commission publishes clear guides for specific cases. The principle, though, is simple: no consent, no pixel. If you also have visitors in the European Union, the same logic applies there.
The right setup: block, ask, then load
This is how we installed the pixel on our own site, and what we recommend to clients.
- Nothing loads on arrival. Meta's script is not on the page until the visitor answers.
- A banner asks the question plainly. It says what the pixel is for and offers two buttons of equal weight: Accept and Decline. Declining has to be as easy as accepting.
- The choice is remembered. The banner does not come back on every page.
- People can change their mind. A "Manage cookies" link in the footer reopens the banner at any time.
- The privacy policy names Meta. It explains what is sent and why.
After "Accept", the pixel loads and sends PageView. After a form is submitted, it sends Lead. After "Decline", Meta receives nothing.
What you lose, and what not to do
Some visitors will decline. Your Meta reports will therefore count fewer events than real visits. That is expected, and it is the cost of a site that respects its visitors.
Meta also offers the Conversions API, which sends events from your server instead of the browser. Meta recommends using it alongside the pixel, with deduplication so the same event is not counted twice. It is a good way to make measurement more reliable, but it is not a way around a visitor's refusal. The choice made in the banner should hold everywhere.
Check your site in five minutes
Open your site in a private browsing window. The banner should be the first thing you see. Open the browser's developer tools, go to the Network tab and filter on "facebook": no request should go out until you answer.
Click Accept, then open "Test events" in Meta Events Manager: a PageView should arrive. Send a test inquiry through your form and Lead should follow. Repeat in a new private window, this time clicking Decline: nothing should be sent to Meta.
If your pixel loads before the banner, or there is no banner at all, fix that before launching your next campaign.
Sources
- Get started with the Meta Pixel — Meta for Developers
- Meta Pixel API reference (standard events) — Meta for Developers
- Meta Business Tools Terms — Meta
- About Conversions API — Meta Business Help Center
- Act respecting the protection of personal information in the private sector (P-39.1) — LégisQuébec
- Principaux changements apportés par la Loi 25 — Commission d'accès à l'information du Québec