How to Add a Facebook Pixel to Your Squarespace Website

Thinking about running some ads on Facebook to advertise a freebie or product? Awesome! Facebook Ads are a great way to drive traffic to your site. But setting up the backend stuff can be a bit tricky.

First off, what is a Facebook Pixel?

A Facebook Pixel is a bit of code that communicates information about your website visitors back to Facebook. Facebook then uses this information to help you optimize your ads, create custom or look-a-like audiences, and track conversions.

So for example, let’s say someone sees your ad on Facebook for a freebie you have on your site. They click on the ad and sign up to get the freebie. The Facebook Pixel will see this and communicate back to Facebook. Several things can happen such as…

  1. The Facebook Ad Manager will learn from this and optimize your ad by showing it to other similar profiles.

  2. You can retarget those that have signed up by showing them ads for a product.

  3. You can create a lookalike audience to show the freebie ad to an audience similar to those that have already signed up.

How does it do this?

The Facebook Pixel Code is set up to track certain actions your visitors make. You can set those actions to mean a certain thing for your business. Facebook calls these ‘events’. For example, you can have the Facebook Pixel track which visitors click on a certain button and tag it as a “Purchase” event. The Facebook Pixel will then know that when a visitor clicks on that button they have completed a purchase.

You can see a list of events here.

Then when you set up an ad you can choose which pixel event you want that ad to optimize for. You can also use these events when creating audiences.

So, where do I get the Facebook Pixel Code and how do I add it?

Squarespace has set it up so that you can grab an ID number from Facebook and paste it into your site. You can find out more information about that here. Although this is super quick and easy, this number will only track overall website visitors and built in Squarespace events such as a purchase from a shop page.

So in this video I am going to walk you through the pages I create in Squarespace when advertising a Freebie or Product and how to add a Facebook Pixel to these pages so that that can track completed registrations, leads, and purchases from outside of Squarespace.

 
 

Step 1: Squarespace Page Set Up

The first step is to set up your Squarespace Pages to be ready for the pixel. This includes opt-in pages, sign up pages, and thank you pages. Once these are set up we can add the pixel to these pages to track specific events. For example, if someone is sent to a Thank You page after registering for your webinar, we can track that page view as a Complete Registration.

Step 2: Add the Facebook Pixel ID to Your Site

Next we can create a facebook pixel in Facebook Events Manager and add the pixel id to your Squarespace site. This will allow the Facebook pixel to track page views, purchases on your shop page, and other standard events.

Step 3: Add Facebook Pixel Code to Specific Pages

In order for Facebook to know that a specific page on your site represents a lead, completed registration, or a purchase we need to add code. This is done by adding the Pixel Base code into the page’s code injection on Facebook. Then you want to replace the page view tracking code with the Standard Event of your choice. You can see more Standard Events here. Don’t forget to test your events afterwards to ensure they are all working properly.

Step 4: Create any Custom Events Needed

If none of the Standard Events match, you can create custom events in Events Manager. I only suggest doing this step if you have a more advanced funnel and customer journey or if you have been instructed to by a Marketer.

Step 5: Set up Aggregated Event Measurement

Aggregated Event Measurement communicates to Facebook which events are important for your business. Once you have all your events set up and tested, set up the event measurement by ranking which events are more important. Event Manager allows you to choose up to 8. So for example you could have Purchase as the most important event, followed by Initiate Checkout, followed by Lead. This allows Facebook to understand your customers journey so that it can show your ads to the people most likely to complete the whole journey.

 
 
Rebecca Grace

Rebecca Grace is a Squarespace CSS Expert and Website Designer.

https://rebeccagracedesigns.com
Previous
Previous

How will Fluid Engine affect my code?

Next
Next

Squarespace SEO not working? Here are 3 things you can do…