{{tag>facebook pixel guide fb}} {{howhard>1}}
====== How to create a Facebook Pixel ======
You will see how to create a web pixel, get the Pixel ID, Create an Access Token and setup an ACL.
===== Create The Pixel =====
Go to The [[https://business.facebook.com/events_manager2/list/|FB Business Manager]]
Click on Green Add Icon on the left and then follow the steps
==== Step 1 ====
{{ :fb:pixel1.jpg?nolink& |}}
==== Step 2 ====
{{ :fb:pixel2.jpg?nolink& |}}
==== Step 3 ====
Choose a Unique Name for your Pixel, avoid using the word pixel.
{{ :fb:pixel3.jpg?nolink& |}}
==== Step 4 ====
{{ :fb:pixel4.jpg?nolink& |}}
===== Get the Pixel ID =====
Go to the overview of the Data Source and select Settings.
The Green Arrow Shows the location of your Pixel ID.
The Red Arrow Shows the location of the Create Access Token.
The Blue Arrow Shows the ACL.
{{ :fb:pixelsettings.jpg?nolink& |}}
===== Create the Access Token =====
Click on the Create Access Token button (Red Arrow in Settings)
==== Step 1 ====
{{ :fb:pixel-act1.jpg?nolink& |}}
==== Step 2 ====
{{ :fb:pixel-act2.jpg?nolink& |}}
==== Step 3 ====
{{ :fb:pixel-act3.jpg?nolink& |}}
==== Step 4 ====
Store the Access Key in a safe place, you are not able to retrieve it in the future and you will have to create a new one.
{{ :fb:pixel-act4.jpg?nolink& |}}
==== Step 5 ====
{{ :fb:pixel-act5.jpg?nolink& |}}
===== Create the ACL =====
Click on the Create Allow List button (Blue Arrow in Settings).
Repeat the steps for all the domains you want the pixel to work for.
==== Step 1 ====
Replace domain.tld with your own domain for example esgr.in
{{ :fb:pixel-acl1.jpg?nolink& |}}
==== Step 2 ====
{{ :fb:pixel-acl2.jpg?nolink& |}}
==== Step 3 ====
{{ :fb:pixel-acl3.jpg?nolink& |}}
==== Check Domain ACL ====
After Adding the domains you can check in the settings (bottom of the page) for all the domains you added.
{{ :fb:pixel-acl4.jpg?nolink& |}}
===== Delete Pixel =====
It is not possible to delete a pixel from your account, but you can disassociate it from any FB Assets.
Visit [[https://business.facebook.com/|Facebook Business Manager]] -> Business Settings -> Data Sources -> Pixels
Select the Pixel you don't need anymore and then on the details select **Connected Assets**
Click on the Trash Icon next to all of the assets listed.
Dont forget to remove the Pixel ID from your site/app.
----
This page has been accessed {{counter|today}} times Today, {{counter|yesterday}} times Yesterday and {{counter|total}} times Since 2020/09/27.