How to Create a Facebook Pixel

177 مشاهدة

How to Create a Facebook Pixel

Facebook Pixel is a programming code that is written in the javascript programming language. After its creation, it is added to your site through the Facebook Pixel. You can track and know site visitors so that you can then make ads and target them again, in the following we will explain how to create Facebook Pixel?

Create Facebook Pixel

  • From the Campaigns page at the top left of the page, we click on All Tools.
  • Then we select “Business Setting” as we see:

كيفية إنشاء الفيسبوك بكسل

  • After that, several options appear for us to choose the “Data Sources” as we can see:

الفيسبوك بكسل

  • From the “Data Sources” you will see several options from which to choose the “Pixels” as we see:

الفيسبوك بكسل

  • You should see a page with all the pixels on your Facebook account.
  • It also shows you the previous set of pixels that were created.
  • But in order for us to be able to create the pixel, follow these next steps with me. Note that you can add the pixel that you have added to any “Ad Account”, and it is also possible that the “Ad Account” contains more than one pixel, and you can add 100 pixels per account.

Steps to create a Facebook Pixel

  • First, we click on “Add”, as we can see:

الفيسبوك بكسل

  • After pressing “Add”, you will see a page that will fill in the data to start adding Facebook a pixel inside it, as we see:

كيفية إنشاء الفيسبوك بكسل

  • The name of the pixel is “Nofa seo PIXEL”.
  • Then it asks you for the name of the site you want to add the Facebook pixel to, and this choice is not mandatory, it is only to determine the way the site works.
  • After that, a page appears with two options:
  • Continue Managing My Business
  • Set up the Pixel Now.
  • We choose the second option as we see:

الفيسبوك بكسل

  • Another screen appears, as shown:

الفيسبوك بكسل

  • In it, Facebook offers you to add additions to the site after you know how it works.
  • But it is better to use “Manually” because it is compatible with all sites, whatever the way they work, as it is a fixed method.
  • After pressing “SET UP MANUALLY”, a page titled “Install Pixel” appears, as we can see:

الفيسبوك بكسل

  • We take the above code “Copy” and go to the site we want to add Facebook pixel to, note that you must be the one who created the site so that you can modify inside it. In the event that there is another person who created the site, give him the pixel to add it to you on the site.
  • After entering the site from the “Control Panel”, we choose from the left of the site the choice called “Appearance” or “Theme Editor” or as we see:

الفيسبوك بكسل

  • The code for the site appears under the title “Astra: style.css” from the title called “Files Theme” or template files on the left of the page, we choose the “Header” from the list.
  • On this page we find the <Head> which is the opening of the “Header tag” is we find </Head> which is the lock of the “Header tag “is a language specific to the “xml”.
  • After the word “Head” we put the pixel code anywhere, let it be immediately after the “Head” as we see:

الفيسبوك بكسل

  • Then we update the file to save the changes we made.
  • We go to the “Install Pixel” page in Facebook Business again, and we find that the pixel is still not working, and it has not been “Activate”.
  • We put the “URl” of the site to which Facebook was added a pixel at the bottom of the page.
  • Then we click on “Send Test Traffic” as we see:

كيفية إنشاء الفيسبوك بكسل

  • After that, the site is opened to see if users are logged in or not.
  • By referring to the “Install Pixel” page on Facebook Business, we find that the Facebook Pixel has already been added, as we can see:

الفيسبوك بكسل

This is the first step in adding Facebook pixels. Because I didn’t specify which events I want Facebook to track pixelated. Is it users visiting or entering a specific page.

The other steps

  • Click on “Continue” and complete the rest of the steps for adding Facebook pixels.
  • After pressing “Continue”, the “Set Up Events” page appears, as we can see:

الفيسبوك بكسل

  • On this page, you will be asked to select the events you want to track, and this is done by clicking on “Use Facebook’s Event Setup Tool – Recommended”.
  • Another page appears with the same title “Set Up Events” asking us to put the “URL” of the site as we see:

الفيسبوك بكسل

  • After typing the site address, we click on “open website”, and it opens the site, but it has a new window with a program called “Event setup tool” through which I will follow what I want inside the site as we see:

الفيسبوك بكسل

  • Inside this window are two options, which are “Track new Bottom”, which is to track any button on the site by simply pressing it
  • or “Track a URL” which is a tracking of the URL itself.
  • If you choose “Track new Bottom” and click on it, it will select all the buttons on the site.
  • For example, choose any button on the site and it will be added, and a message will appear to choose the button and confirm the choice, as we see:

الفيسبوك بكسل

  • After we have made the selection, it will appear in the program list, as we can see:

الفيسبوك بكسل

  • In this case, if the user presses the Add to cart button that you selected, he will be tracked.
  • It is possible to add more than one “Track”, for example, add the (About Us) button and choose the appropriate event for the (About Us) page, and let it be, for example, contact, so anyone who clicks on Who We are will be tracked as we see:

الفيسبوك بكسل

  • We can also track the “URL”. We click on “Track a URL” and select the appropriate “Event” and let it be “View Content” so anyone who will enter the site and see the content will be tracked and recorded in the “View Content” list, as we see:

كيفية إنشاء الفيسبوك بكسل

  • After you have finished adding all the “Events” that you want, click on “finish” as we can see:

الفيسبوك بكسل

  • Returning to the Facebook Business page, Facebook will show us the pixel that was added with the name “Nofalseo’s Pixel” as we see:

الفيسبوك بكسل

Now the Facebook pixel has been successfully added to the Facebook Business account. You can add “Events” or modify the pixel as you want. This step is done through the “Event Manager” and with this we have finished the article and in the next article we will learn about the event manager on Facebook.

 

All Copyright Reserved for Nofal S.E.O™ 2022