3 Easy Ways to Add Facebook Pixel to WordPress, Shopify and Website

By | 14 March, 2017

Adding a Facebook pixel is the first step towards effective Facebook advertising. Learn how to add Facebook pixel to WordPress, Shopify or website. A single Facebook pixel is capable of tracking conversions, creating target audience as well as support optimizing ad performance. Therefore, the importance of correctly adding the Facebook pixel to your website cannot be brushed away.

Since your website could be created on a self-hosted WordPress, a Shopify e-commerce store or self-coded – this post covers the best ways to add Facebook pixel in either of the platforms. Many Facebook marketers take too long to figure out their Facebook pixel installation, primarily because of the technical difficulties associated with the same. However that not need be the case with this simple guide on how to add Facebook pixel to WordPress, Shopify or a website.

Find your Facebook Pixel

Before we add the pixel, I must show you where you can find the pixel within Facebook advertising dashboard.

Go to this link: https://facebook.com/ads/manager/pixel. This is the direct link to the page where you will find your pixel.

Facebook pixel WordPress Shopify Website

The above image is how your screen would look, first click on the Create Pixel tab, then once done, click on the green “Set up pixel” button.

Facebook pixel WordPress Shopify Website

Once done, you will be offered two options as shown above- choose “copy and paste the code”. Once you do, you will be offered a pop-up with your Facebook pixel. As shown in the image below. The highlighted number sequence below is what is known as the Facebook pixel ID.

Facebook pixel WordPress Shopify WebsiteThere you go, now copy-paste the above code and follow the instructions below to add this Facebook pixel to WordPress, Shopify or a stand-alone website.

Adding Facebook Pixel to WordPress

WordPress being an open-source Content Management System is the easiest platform you will find to add the pixel. The array of options available to you are incredible. However, I prefer the simplest way to inject the code into your WordPress theme. The Facebook pixel needs to be inserted in the Header of your WordPress theme. To insert your code, follow the breadcrumb trail as depicted below in your WordPress dashboard:

WordPress Dashboard > Appearance > Editor > Header.php

Add Facebook pixel WordPress

As shown in the screenshot above, your Facebook pixel is right below the <head> tag and should be present before the </head> tag.

Some people usually just prefer to use a free WordPress plugin to add the Facebook pixel to WordPress. For them I suggest Tracking Code Manager. Simply install this plugin on your WordPress site and go to the plugin setup screen. You will be presented with a console as shown below. Add your code to the black area and you’re good to go.
Facebook Pixel WordPress PluginIn the above page, choose the below settings:

  • Position before the closing HEAD tag
  • Show on all devices
  • Standard code tracking in your WordPress
  • In the whole website (pages, posts and archives)

Ideally, I would simply suggest to manually add the Facebook pixel to your WordPress theme as aforementioned.

Add Facebook Pixel to Shopify

Shopify is a popular e-commerce software that many small scale e-commerce brands are using these days. If you need help in adding Facebook pixel to your Shopify store, here is a quick guide to accomplish it.

Given that Shopify is a world-leading robust e-commerce platform. They have a very straight forward arrangement for adding your Facebook pixel.Facebook Pixel Shopify

Go to your Shopify store dashboard > Online store > Past Facebook Pixel ID. You will be looking at a screen as shown above. Remember that, you only need to paste your Facebook pixel ID and not the whole code.

Add Facebook Pixel to Website

Any other website apart from WordPress and Shopify, the easiest way is to use manually inject the Facebook pixel code in your header tag. Alternatively, you can use the Google Tag Manager service. If you use Google Adwords, Analytics and host of other code, you’re probably already familiar with Google Tag Manager. Find the guide with screenshots to set up Facebook pixel on your website.

Within Google Tag Manager, click on “New Tag”.

Select “Tag Congifuration” and choose “Custom HTML”.

In the screen that follows, paste your Facebook pixel code in the empty white box.

Expand the Advanced Settings and within tag firing options select “once per page.”

Click “Triggering” – this allows you to choose under what conditions should the code you have inserted trigger.

Since the Facebook pixel ID should trigger in all pages whenever it is viewed. Choose “All pages”.

Finally, name your tag, save it and publish to make it go live!

Conclusion

The primary thing to remember when you’re setting up a Facebook pixel is that it should be in the header tag of your theme and it should fire on all pages. This allows you to create powerful website customer audiences for your Facebook ads. All the above options allow you to insert Facebook pixels effectively. Let me know in comments if you have any other methods through which you implement your code.

Leave a Reply

Your email address will not be published. Required fields are marked *