Creating and setting up Facebook Pixel
Creating a pixel
To create a pixel, go to Events Manager and press the green key +
In the window "Connect a New Data Source" select "Web" then press "Connect".
Then select "Pixel Only" and press "Next".
On the next page, specify the name of a counter and flow or website url and click Continue.
If you're planning to work with a flow, you can finish pixel creation at this stage.
Copy its number and insert it in flow settings.
If you placed a landing page on your hosting service, select "Manually add Pixel code to website" in the next window pressing "Install code manually", then copy the basic code and insert it on your landing page.
Also, you have to add "Lead" event script to the "Thank you" page.
When you create an ad campaign, select "Conversion" as a goal
Then, go to Ad groups tab and select previously created pixel.
Adding a pixel when creating a flow
If you plan to work with a flow (drive traffic to our servers or your hosting service), then just enter the pixel number in the settings of your flow in the "Counters" section.
IMPORTANT: Entering counters in offer flows with redirect landings is limited: if the advertiser supports pixel transfer, then the field for entering the pixel will be active. Also pay attention to the description in the offer card, where the nuances of how pixels work may be indicated.
Adding a pixel when downloading a landing page to a hosting service
When you download a landing page to a hosting service, put pixel scripts before the </head> closing tag in the files:
- index.php – in the root of a landing page,
- invoice2/index.php – "Thank you" page.

Second option:
- trackers.php – shown on the landing page itself,
- trackers_order.php – on the "Thank you" page.
Add basic pixel code with PageView event to the main page:
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'your_pixel_number'');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=your_pixel_number&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
In addition to PageView, you also have to add Lead event to the Thank you page to track conversion:
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'your_pixel_number');
fbq('track', 'PageView');
</script>
<script>
fbq('track', 'Lead');
</script>

<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=your_pixel_number&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
Dynamic pixel
You can set up a dynamic pixel and change it in the website's URL, thus, you can drive traffic to a specific landing page or flow, using different counters.


When you work with a flow, if you want to add a pixel to address, tick the box next to "In URL" box in flow settings in «Counters» section.

Then, add the parameter ?fb_pixel=your_pixel_number (if there're no other parameters in the link yet) or &fb_pixel=your_pixel_number (if there're other parameters) to the flow link that you're planning to use for your ad campaign. After that, you can change the number in the link without changing anything in a flow.
If you downloaded a landing page, then there is no need to insert codes into the landing page.
Just add ?fb_pixel=your_pixel_number (if there're no other parameters in the link yet) or &fb_pixel=your_pixel_number (if there're other parameters) parameter to your link.
Short pixel
If you download a landing page to your hosting service, you can use a short pixel script. In this case, only "Lead" event will work on the "Thank you" page.

Add script to trackers_order.php file or put it before the closing tag </head> in invoice2/index.php file.
<!-- Facebook Pixel Code -->
<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=your_pixel_number&ev=Lead&noscript=1"/>
<!-- End Facebook Pixel Code -->
How to check if a pixel works correctly
Use Facebook Pixel Helper app.


Follow your link and check if all events are displayed correctly:

- PageView event on the main page of the website:

- PageView and Lead event after an order is placed: