Open Menu
Social Media Social Media Is Constantly Being Updated - So You Should Be Too

Stay in the loop on all things social media and browse our articles below for advice on how to use it for your business.

Posted On: 10th December 2020

How to Create a Facebook Pixel and Add It Your Website

A Facebook Pixel is a piece of code you can add to your website to allow you to track user data. It can be used to enhance your social media advertising campaigns by enabling you to target similar users to your existing customer base, including those who are more likely to convert and previous visitors on your website.

Step 1: Create Your Pixel

After signing into your Facebook Business Manager account, you’ll need to navigate to the menu where you’ll see Events Manager.

Choose Connect a Data Source, select Web and tick Facebook Pixel.

Step 1 - Events Manager

Give your pixel a name, add your website URL and click Create.

Step 1 - Choose Pixel

Each Facebook Ad account should have its own pixel and be connected to a specific business rather than a campaign.

Step 2: Add the Pixel Code to Your Website

There are two options when adding a Facebook Pixel to your website: integration through a platform or Google Tag Manager, or manual installation.

Step 2 - Options

If you use an e-commerce platform like Woocommerce or Shopify, you can install the pixel without updating any code on your website. Facebook also integrates with Google Tag Manager and connects to your existing property and adds your pixel directly to your container.

Step 2 - Partner Integration

If you are manually installing the code yourself, you’ll need to copy and paste the code into the header of your website. This needs to be added to every page of your website or added to the template you’re using.

You’ll be asked if you want to enable automatic advanced matching. This matches customer data from your website to Facebook profiles which can allow you to track conversions more accurately (we’d recommend you do this).

Step 2 - Advanded Matching

Step 3: Track Events

Once you’ve added the pixel to your website, you’ll need to track events. Events such as Purchase, Add to Cart and Initiate Checkout are automatically synced when you use a third party integration method (such as WooCommerce). You can also track events by either adding separate pieces of code to your website or by using the Event Setup Tool (this doesn’t require you to use code).

Step 3 - Set Up Events

You can also manually create events where you can define conversions by using URL rules.

Step 4: Confirm Your Pixel is Working

The final step is to confirm your pixel is tracking events properly. You should be able to see traffic and events appearing within Events Manager.

Step 4 - Check Events

And you’re done!