Include Facebook conversion pixel in WordPress with and without plugin

Author:  
Tanvir Hasan
Category: 
May 24, 2022

Have you ever visited a website and later start seeing its Facebook ads? If so, you have probably wondered how this is done and what advantage it has. The website is using an easy-to-use tool built into Facebook Ads Manager called Facebook Pixel to carry out a type of marketing known as retargeting.

Retargeting, also known as remarketing, allows you to show ads to users who are already known to be interesting in your website. Using the Facebook Pixel may retarget your ads to previous visits to the website.

To use Facebook Pixel you will have to install a code on your website. This code tells Facebook that someone has visited this page, which allows Facebook to track your traffic, which in turn allows you to target your website's audience on the social network.

In this article, we are going to take a look at how to install this code on a WordPress website.

1️⃣ Step 1. Get the Facebook pixel code

Facebook Pixel is part of the Facebook advertising platform. Anyone with a Facebook account has access to this platform. To enter you must be logged into Facebook and select the ad manager. This is located in the top-right dropdown menu with the down arrow under Create Ads. In Facebook Ads Manager select Ads Manager and then pixel. Next, click on the button that says Create a pixel. This will give you the necessary code to place in the header of your web page.

You will be prompted to choose a name for the pixel. You can only have one pixel per ad account. Facebook recommends that you choose a name to match your business. Name your pixel according to the terms and hit Create Pixel again. Your Pixel is now ready to install. You have the option to use the code yourself or email someone like a developer to implement it for you. Now select Install Pixel.

Copy the JavaScript code to place it on your website. I recommend pasting it into a text editor and saving it to have it handy. 

2️⃣ Step 2. Install the code manually

You can install the code manually or you can add it to a plugin that controls your headers. To manually install the code to your WordPress dashboard select Appearance and then Editor. On the right side of the screen, select the theme header.

Find the tag and paste the code just before it. You may have to add a few lines to leave a space. After pasting the code click on Update file and that's it. Your code will run on your WordPress website.

Note – If you change themes you will have to add the code for the new theme. An alternative method would be to use a plugin that handles your headers like Header and Footer. Simply place the code in the header scripts and the code is placed in the header. Now if you change themes you no longer have to worry about adding the code to your new header file.

In order to improve tracking, you may prefer to use a specific code on posts or pages instead of the entire website. Facebook has code snippets that you can use to track individual pages and events but they are not WordPress friendly. A better option would be to place the code on the pages and posts using a plugin.

3️⃣ Step 3. Facebook conversion pixel in WordPress Plugin

If you only want to place the code on specific pages, posts, and custom post types, you can use a plugin like Facebook Conversion Pixel. With this plugin, you can enable the plugin to work with various posts, pages, and post types including WooCommerce and others. For example, you can enable the product post type and place the code on your checkout page for easy tracking.

Once you've installed it and activated the post types you want to use, go to the page or post for that post type. Now a box will appear where the code can be placed. Click on the button to allow the code to work and paste the code into the box. When publishing or updating the page the code will be executed.

The advantage of placing the code in a specific post is knowing that visitors have already seen your offer.

4️⃣ Step 4. The use of Facebook Pixel on various websites

You only get one pixel per ad account. That's not a problem if you only use one pixel per website, but what if you want to use it for multiple websites? You can do one of two things:

Have more than one ad account. This might work, but you're going to have to deal with multiple logins, multiple tracking stats, and payments, which can be annoying. This is ideal if you have a team and have assigned a different team member to each account.

Use the same pixel in all your domains and establish rules to distinguish between them. This is done by creating a custom audience.

To create a custom audience go to Facebook Pixel in Ads Manager and select Create Audience. In the “Website Traffic,” dropdown box choose people who visit the specific web pages. This will show you another box where you can add URL keywords. Put your domain name here. In the Audience Name box, type a name for that specific audience.

This is a good idea, even if you're just using the code on a website. They can track specific offers on your website and then show a different ad based on the offer they saw on your website.

Conversion tracking

Although the Facebook Pixel tracks website visits rather than conversions, there is a way to track conversions across multiple domains. For this, you will have to create a custom conversion for each domain. Keep in mind though, that only 20 custom conversions are allowed.

  • On Facebook, Pixel Manager selects Create Conversion. In the next window select Custom Conversion Tracking
  • Type in the URL and select the category you want and hit Next.
  • Give it a name and set the conversion value if you like, and then tap Create

 Once you have collected enough data you can target your ads based on conversions.

5️⃣ Step 5. Analysis of your statistics

The pixel allows you to see web traffic, conversion, and optimization tracking and remarketing. You can see traffic by events, URLs, domains, and devices. You can create ads, audiences, conversions, and actions.

Conclusion

Facebook is an excellent platform for building your brand and targeting your audience. You can promote your Facebook posts using ads, but instead of targeting a broad audience which can reduce retargeting, it can be used to get better results for less money.

Not only is Facebook pixel a great tool for getting the most out of your Facebook ads, it's also free and easy to use. Even if you're not using Facebook Ads now, you can use analytics and tracking to help you use it later.

I would like to know what you think Do you use Facebook Pixel with WordPress? Do you have something to add? Tell us more in the comments.

 

TAGS
Related Articles
0
    0
    Your Cart
    Your cart is emptyHome
    linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram