Facebook Pixel is an analytics tool that tracks visitor actions on your site. For example, when a visitor buys something, Facebook uses that data to help you understand your audience and target people for ad campaigns.
To add the pixel code to your site, follow this guide.
Tip: To view traffic and conversion from Facebook without using Facebook Pixel, visit Traffic Sources Analytics.
The solution in this guide includes injecting code. Code Injection is a Premium feature available in the current Website Business plan and higher:
- Available in: All Business and Commerce plans
- Available in: Legacy Personal plan (no longer available for new subscriptions)
- Not available in: Current Personal plan
- Trial: You can use Code Injection during a trial.
To learn more, visit Premium features.
Step 1 - Get the code from Facebook
The first part of the process is to get the code from Facebook that you'll add to your site:
- If you haven't already, create a Facebook Pixel in the Facebook Ads Manager.
- In the Facebook Pixel section, click Set up Pixel.
- In the window that appears, click Manually install the Code Yourself.
- Click anywhere on the Facebook Pixel code to copy it.
For more detailed help with this step, visit Facebook's documentation.
Step 2 - Add the code to Code Injection
Next, add the code to your Squarespace site:
- Log into your Squarespace site.
- In the Home Menu, click Settings, then click Advanced, then click Code Injection.
- Copy and paste the code snippet into the Header field.
- To track purchases specifically, scroll down and paste the code into the Order confirmation field. To learn more about conversion tracking with Facebook Pixel, visit Facebook's documentation.
- Click Save.
The new Code Injection should look like this:
Once you've completed these steps, you can use Facebook's advertising and conversion tools. To check if Facebook Pixel is working, visit this guide from Facebook for tips.
Tip: To learn more about our built-in integration with Facebook, visit Using Facebook with Squarespace.
Note: This third-party customization falls outside the scope of our support. This means that we’re unable to help further with setup or troubleshooting. Additionally, since this is a code-based solution, we can’t guarantee its functionality or full compatibility with Squarespace. This includes how it functions with our responsive design, particularly its appearance on mobile devices, and if it functions on all templates. Third-party customizations can also cause display issues with future updates to our platform. While we can't help further, there are many resources that can point you in the right direction: