Facebook Tips & Strategies

How to Put a Facebook Pixel on Squarespace

By Spencer Lanoue
October 31, 2025

Putting the Meta Pixel on your Squarespace site is one of the most powerful moves you can make for your marketing. This simple connection unlocks the ability to track how visitors interact with your website, measure the true effectiveness of your social media ads, and retarget interested customers. This guide provides a complete, step-by-step walkthrough for getting your pixel set up and running, no code-wrangling experience needed.

What Exactly is the Meta Pixel? (And Why You Need It)

Before we get into the setup, let's quickly cover what you're actually adding to your site. The Meta Pixel (formerly known as the Facebook Pixel) is a small snippet of code generated from your Meta Business Account. When you place this code on your Squarespace website, it acts as a bridge, sending information about visitor actions from your site back to Meta (Facebook and Instagram).

This isn't about spooky surveillance. It's about smart marketing. Here's what it practically allows you to do:

  • Measure Ad Performance: Ever wondered if your Facebook ad campaigns are actually leading to sales? The pixel tracks this. You can see precisely which ads are driving traffic, add-to-carts, and most importantly, purchases. This lets you stop wasting money on ads that don't work and double down on what does.
  • Create Retargeting Campaigns: Someone visited your site, browsed a few product pages, maybe even added an item to their cart, but then left without buying. The pixel "remembers" them. You can then run highly specific ads on Facebook and Instagram reminding them about the product they looked at. It's a gentle nudge that can dramatically improve your conversion rate.
  • Build Powerful Custom Audiences: The pixel collects data on your website visitors. Meta can then use this anonymous data to find *new* people on its platform who share similar characteristics to your current site visitors. This is called creating a "Lookalike Audience," and it's one of the most effective ways to find potential customers who are likely to be interested in your brand.
  • Optimize Your Ads for Conversions: When you run an ad with the goal of getting purchases, Meta uses your pixel data to learn about the 'type' of person who buys from you. It then refines its ad delivery to show your ads to other people who are most likely to convert, maximizing your ad budget.

In short, without the pixel, you're flying blind with your social media advertising. With it, you're making data-driven decisions that lead to smarter spending and better results.

Step 1: Get Your Meta Pixel ID

Before you can add the pixel to Squarespace, you need to grab its unique identification code from your Meta Business Suite. If you've run Facebook ads before, you likely already have a pixel. If not, creating one takes less than a minute.

How to Find Your Existing Pixel ID

The easiest way to get started is by heading directly to the Meta Events Manager. Look at the menu on the left side of the screen.

  1. Click the green plus icon labeled "Connect Data Sources" and select "Web." Click "Connect."
  2. Give your pixel a name. Something simple like "[Your Brand Name] Pixel" is perfect. Click the "Create Pixel" button.
  3. Next, Meta will prompt you to check for partner integrations. Go ahead and enter your Squarespace website URL and click "Check."
  4. Meta might detect you're on a partner platform, but for our purposes, we'll manually get the ID. Follow the prompts until you are asked how to install the code. At this point, you just need to locate the pixel ID.
  5. You can find your Pixel ID on the main Events Manager page under your pixel's name. It's a long string of numbers. Copy this number - you'll need it in the next step. You don't need any of the code, just the ID number.

How to Create a New Pixel

If you've never created a pixel, the process is simple.

  1. Navigate to the Meta Events Manager.
  2. Click the green plus button "Connect Data Sources" on the left-hand menu.
  3. Select Web and click "Connect."
  4. Name your new pixel. For example, "My Awesome Shop's Pixel." Add your website URL when prompted.
  5. Click "Continue." Meta will then ask you how you'd like to install the Pixel. Close this window once the Pixel is created as we won't be using these options.
  6. Your new Pixel will now show up on the left-hand panel. Your Pixel ID is listed directly under the Pixel's name, right here in the Events Manager. It's a string of numbers. Copy this number.

Whether you found an existing ID or created a new one, you should now have a clipboard with a number like `1234567891011121`. This is all you need for the simple Squarespace integration.

Step 2: Add the Pixel ID to Your Squarespace Site

Squarespace knows how important the Meta Pixel is, so they've made adding it incredibly simple, especially if you're on a Business or Commerce plan. We'll cover the primary method first, which works for 99% of users.

The Preferred Method: Using Squarespace's Built-In Integration

This is the quick and easy way that handles everything for you - no code injection required. It automatically sets up tracking for essential e-commerce events like `add to cart`, product views (`viewContent`), and `purchase` events.

Requirement: This method is available on Squarespace Business, Commerce Basic, and Commerce Advanced plans.

  1. Log in to your Squarespace account and open the main dashboard for your site.
  2. In the main Home Menu, click on Marketing.
  3. From the Marketing panel, select Facebook Pixel & Ads.
  4. You'll see an input box labeled "Pixel ID." This is where the magic happens.
  5. Paste your Meta Pixel ID that you copied earlier into this box.
  6. Click the Save button at the top of the panel.

And that's it. You are done. Squarespace will now automatically add the pixel base code to every page of your site and will dynamically fire specific event codes when customers take actions on your site. You don't need to do any further coding.

The Alternative Method: Manual Code Injection

If you're on a Squarespace Personal plan or need to add very specific, custom events not covered by the standard integration, you'll need to use the Code Injection option. This is a bit more hands-on.

  1. Go back to your Meta Events Manager.
  2. Select your pixel, then click on the "Manage Integrations" button and choose "Manage" again from the pop-up modal.
  3. Choose "Install Code Manually".
  4. Meta will show you the entire Pixel base code. Click the "Copy Code" button. It will look something like this:

<,!-- Meta Pixel Code -->,
<,script>,
!function(f,b,e,v,n,t,s)
{if(f.fbq)return,n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)},
if(!f._fbq)f._fbq=n,n.push=n,n.loaded=!0,n.version='2.0',
n.queue=[],t=b.createElement(e),t.async=!0,
t.src=v,s=b.getElementsByTagName(e)[0],
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js'),
fbq('init', 'YOUR-PIXEL-ID'),
fbq('track', 'PageView'),
<,/script>,
<,noscript>,<,img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=YOUR-PIXEL-ID&,amp,ev=PageView&,amp,noscript=1"
/>,<,/noscript>,
<,!-- End Meta Pixel Code -->,

  1. Now, in your Squarespace dashboard, go to Settings.
  2. Under the Website section, click Code Injection.
  3. Paste the entire Meta Pixel code snippet into the Header section.
  4. Click Save.

Heads Up: This manual method will only track `PageView` events by default. To track other actions like purchases, you must manually add event-specific code snippets to specific pages (like the Order Confirmation Page's code injection area), making it much more complex than the built-in integration.

Step 3: Test and Verify That Your Pixel is Working

Don't just assume everything is working. Verifying your setup will give you the peace of mind that your data is being tracked accurately before you spend a single dollar on ads.

Option 1: Use the Meta Events Manager

The simplest check is to use Meta's built-in testing tool.

  • In Events Manager, stay on your pixel's overview page. Select the "Test Events" tab.
  • Visit your Squarespace site in a separate browser tab. Just click around a few pages.
  • You can also use the test events tool here and enter your website's URL.
  • In Meta Events Manager, you should see test events showing up. You will know your pixel is working if events appear in your test events history.

Option 2: Use the Meta Pixel Helper Chrome Extension

This is a recommended tool for ongoing checking and tracking. It's a free browser extension that allows you to see exactly what pixels and events are firing as you browse your website.

  • To install it in Chrome, search for "Meta Pixel Helper".
  • Add the extension to your browser.
  • Visit your website and click the Pixel Helper icon in your toolbar. The icon will light up with a number indicating how many pixels have been found on the page.
  • Clicking the icon will show you a detailed breakdown of your pixel's activity, including which events are being tracked and if they are firing correctly.
  • As you go through your site and engage with it, you can use the Pixel Helper to ensure the correct events like content views, add to cart, and purchases are being sent to Meta properly.

Final Thoughts

Installing the Meta Pixel on Squarespace is a smart and straightforward process, especially with the built-in integration that does the heavy lifting for you. It sets your business up for running efficient and profitable social media campaigns by ensuring your web traffic is tracked, and that you are focusing on engaging with the social media content that actually drives sales. The Meta Pixel is a powerful tool that can capture detailed data to help you optimize your conversion strategies.

Spencer's spent a decade building products at companies like Buffer, UserTesting, and Bump Health. He's spent years in the weeds of social media management—scheduling posts, analyzing performance, coordinating teams. At Postbase, he's building tools to automate the busywork so you can focus on creating great content.

Other posts you might like

How to Add Social Media Icons to an Email Signature

Enhance your email signature by adding social media icons. Discover step-by-step instructions to turn every email into a powerful marketing tool.

Read more

How to Add an Etsy Link to Pinterest

Learn how to add your Etsy link to Pinterest and drive traffic to your shop. Discover strategies to create converting pins and turn browsers into customers.

Read more

How to Grant Access to Facebook Business Manager

Grant access to your Facebook Business Manager securely. Follow our step-by-step guide to add users and assign permissions without sharing your password.

Read more

How to Record Audio for Instagram Reels

Record clear audio for Instagram Reels with this guide. Learn actionable steps to create professional-sounding audio, using just your phone or upgraded gear.

Read more

How to Add Translation in an Instagram Post

Add translations to Instagram posts and connect globally. Learn manual techniques and discover Instagram's automatic translation features in this guide.

Read more

How to Optimize Facebook for Business

Optimize your Facebook Business Page for growth and sales with strategic tweaks. Learn to engage your community, create captivating content, and refine strategies.

Read more

Stop wrestling with outdated social media tools

Wrestling with social media? It doesn’t have to be this hard. Plan your content, schedule posts, respond to comments, and analyze performance — all in one simple, easy-to-use tool.

Schedule your first post
The simplest way to manage your social media
Rating