Brad Good | Squarespace Expert, Designer & Developer

View Original

Adding A Facebook Pixel To Your Squarespace Website

Facebook Pixel is a tool that tracks visitor activity on a website to help Facebook understand and target users for ads. For example, if a visitor views a product, Pixel can read that information so you can show ads for the product to that same visitor.

Facebook Pixel is a helpful integration for any business, whether you’re selling products or want to drive more traffic to your site. This guide reviews how to set up the integration and includes the data Facebook Pixel collects about your visitors.

To learn about other ways you can integrate with Facebook, visit Using Facebook with Squarespace.

Set up the Facebook Pixel integration


Step 1 - Remove any pixel code (optional)

Tip: If you’ve never used Facebook Pixel with this Squarespace site, skip this step.

If you set up Facebook Pixel by adding the code to Code Injection, you’ll need to remove the code to use the built-in integration. Removing the code won’t affect your data in Facebook, as long as you add your pixel ID shortly after removing the code.

To remove the code:

  1. Log into your Squarespace site.

  2. In the Home Menu, click Settings, then click Advanced.

  3. Click Code Injection.

  4. In the Header field, delete any pixel code. Only delete the code beginning and ending with <! -- Facebook Pixel Code -->. Deleting anything else in this field could break other site customizations added in Code Injection, which Customer Care can’t troubleshoot.

  5. In the Order Confirmation field, look for similar pixel code and delete it.

  6. Click Save at the top of the panel.

  7. If you have any Facebook code on individual pages, remove it from the Page Header Code Injection.


Step 2 - Get your pixel ID from Facebook


To use Facebook Pixel with Squarespace, you’ll need your pixel ID:

  1. If you haven't already, follow Facebook’s steps to create a Facebook Pixel.

  2. Copy the pixel ID for the Facebook Pixel that you want to add to your site.


Step 3 - Add your pixel ID to Squarespace


Add your pixel ID to your site:

  1. In the Home Menu, click Marketing, then click Facebook Pixel.

  2. In the field next to Facebook Pixel, add the pixel ID you copied from Facebook.

  3. Click Save.

View visitor data on Facebook

Once you've added your pixel to Squarespace, it will start tracking events on your site. You’ll review and take action on this data directly in Facebook. Most data only takes a minute or two to reach Facebook, but sometimes it can take up to an hour. 

Visitor data Facebook Pixel tracks

Since you might need to know this information for your site’s privacy policy, here’s a explanation of the exact data Facebook Pixel can see about your visitors. Facebook can read visitor data from any of these pages:

  • Products Pages

  • Checkout page

  • Any page with a Search Block

  • Any page with a Newsletter Block or Promotional Pop-Up

  • Any page where a customer creates an account


This is how Facebook Pixel works and isn’t within Squarespace’s control. To see the data Pixel collects from your site, use the Pixel Event Manager.

Remove Facebook Pixel


To stop Pixel from tracking new events from your site, follow these steps:

  1. In the Home Menu, click Marketing, then click Facebook Pixel.

  2. Delete the information in the Pixel ID field, and save your changes.


After removing the ID, Facebook will no longer track new visitor data from your site. You can still view past events in your Facebook Events Manager. 

Where to go for support and questions

For help on any of the steps covered in this guide, contact Customer Care. For all other help with Facebook Pixel—including creating a pixel, reviewing metrics, and setting up dynamic ads—visit the Facebook Business Help Center.