Facebook Pixel Placement on Squarespace

Using Facebook Pixel with Squarespace

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 to integrate with Facebook, visit Using Facebook with Squarespace.

The Facebook Pixel integration is a Premium feature available in Business and Commerce plans.

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 Support can’t troubleshoot.

  5. In the Order Confirmation Page 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 & Ads.

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

  3. Click Save.

View Visitor Data on Facebook

After 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.

How Facebook Pixel Events Map to Visitor Actions

Facebook calls specific actions visitors can take on your site “events.” To see these events, use the Pixel Event Manager.

Use this table to understand the name of the event on Facebook and the action it corresponds to on your site:

Event name in Facebook

Action on your Squarespace site

ViewContent

A visitor opens a Products Page

Search

A visitor searches your site

AddtoCart

A visitor clicks Add to Cart or Buy Now on any product details page, Quick View, Product Block, or Summary Block

InitiateCheckout

A visitor proceeds to the checkout page

AddPaymentInfo

A visitor clicks Continue at the Payment step during checkout

Purchase

A visitor completes their purchase and proceeds to the Order Confirmation page. See below for more information.

Lead

A visitor signs up for a mailing list through a Newsletter Block, promotional pop-up, Cover Page, or at checkout

CompleteRegistration

A visitor creates a Customer Account

 Purchase Events

Purchase events aren't created for test orders, and don't differentiate between one-time purchases and subscriptions. If a customer buys a subscription product, only the first order creates a purchase event.

Visitor Data Facebook Pixel Tracks

Since you might need to know this information for your site’s privacy policy, here’s an 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.

You can use this table to understand the visitor data Facebook collects for each event.

Facebook event name

Data collected

ViewContent

  • Page name

  • Product or product group name

  • Product SKU

Search

  • Search query

  • Search result the visitor clicked on

  • Any tags or categories related to the search results

AddtoCart

  • Product name

  • Product SKU

  • Product type

  • Order subtotal

  • Order currency

InitiateCheckout

  • Product name

  • Product SKU

  • Product type

  • Order subtotal

  • Order currency

  • Number of items

AddPaymentInfo

Pixel records the event, but no additional data

Purchase

  • Product name

  • Product SKU

  • Product type

  • Order subtotal

  • Order currency

  • Number of items

Lead

Pixel records the event, but no additional data

CompleteRegistration

Pixel records the event, but no additional data

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 & Ads.

  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.