Articles on: ADVANCED TUTORIALS

How to install the Facebook pixel without exposing your offer page

If you use the Facebook pixel on an offer page protected by The White Rabbit (TWR), the pixel installed the standard way leaks that page's URL on every fire. To fix this without losing conversion tracking, add a single line to the page head: the no-referrer meta tag. Your pixel keeps working the same, and the page stays isolated against spying.


The problem: the Facebook pixel leaks your offer page's URL


The Facebook pixel's base code is a script that fires a request to the platform's server on every event. On that fire, the browser attaches the HTTP Referer header with the full URL of the page where the pixel ran, that is, your offer page.


TWR keeps that page isolated precisely to protect it from competitor spying and automated access. When the pixel sends the offer page URL in the Referer, it opens a gap that exposes the address you want to keep private.


The solution: add a single line to your page head


Paste this line inside your offer page's head tag:


<meta name="referrer" content="no-referrer">


That's it. This line disables the Referer for the whole page. You keep using the Facebook pixel exactly as you already installed it, with the same events configured the way Facebook teaches. The difference is that no fire, from the pixel or any other element on the page, will carry the page URL anymore.


Solves most cases, it's a one-time change, and it also protects any other part of the page that could leak the address.


If you build the Facebook pixel by hand (advanced)


The meta tag above solves most cases. The options below are for those who build the pixel URL manually (for example, firing the pixel through a tag manager) or can't edit the page's head tag. If the meta tag already solved your case, you can skip this section.


Fix the img tag Facebook already gave you (most recognizable)


If you've already installed the pixel, you probably have Facebook's noscript block on the page, with an invisible img tag like this (the event and values depend on what you track):


<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=YOUR_ID&ev=Purchase&cd[value]=97.00&cd[currency]=USD&noscript=1">


As it is, it still leaks the page URL. To fix it, add referrerpolicy="no-referrer" at the end:


<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=YOUR_ID&ev=Purchase&cd[value]=97.00&cd[currency]=USD&noscript=1"
referrerpolicy="no-referrer">


This fires the pixel when the page loads, for example on a thank-you page after purchase, without sending the address.


Prefer the iframe tag instead of img? Works the same: keep the same src and add referrerpolicy="no-referrer" to the iframe tag. Both forms are equivalent.


Fire via fetch (on a specific event)


Use when the pixel needs to fire from a script, for example on a button click:


fetch("https://www.facebook.com/tr?id=YOUR_ID&ev=Purchase&cd[value]=97.00&cd[currency]=USD&noscript=1",
{mode: "no-cors", referrerPolicy: "no-referrer"});


What to change in the pixel URL


In both options above you build the URL by hand. Adjust these parts for your case:


Part

What it is

What to put

id=YOUR_ID

Your pixel number

Your pixel ID, found in Facebook's Events Manager

ev=Purchase

The event, that is, the action you're tracking

Your case's event name (see table below)

cd[value]=97.00

The conversion value

Your product's price. Only required for sale events

cd[currency]=USD

The value's currency

USD for dollar, EUR for euro, etc.


The event tells Facebook what action the user took. Use the exact name Facebook defines for your case:


Your situation

Event (ev=)

Completed sale / purchase

Purchase

Sign-up or lead form filled in

Lead

Registration completed

CompleteRegistration

Just viewing a page or product

ViewContent

Page visit (general)

PageView


For sale events (Purchase), always include cd[value] (the value) and cd[currency] (the currency). Without them, Facebook counts the purchase but doesn't know how much it was worth, and you lose return-based optimization. Events like PageView and ViewContent don't need a value. The full list of events is in Facebook's official documentation.


Updated on: 21/07/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!