Setting Up Meta Pixel with your Squarespace Store

Bhavik
GrowWithSqsp
Published in
2 min readFeb 10, 2024

If you're running an online store on Squarespace and want to enhance your advertising strategy, integrating Facebook's Meta Pixel is a crucial step. Meta Pixel allows you to track user interactions on your website, providing valuable data for more effective Facebook ads. Follow these steps to seamlessly set up Meta Pixel with your Squarespace store.

Setting Up Meta Pixel with your Squarespace Store — LoftyDevs
Setting Up Meta Pixel with your Squarespace Store — LoftyDevs

Step 1: Create a Facebook Business Account

If you haven't already, create a Facebook Business account at business.facebook.com. This account will serve as the foundation for your advertising efforts.

Step 2: Access Facebook Events Manager

  • Log in to your Facebook Business account.
  • Navigate to 'Business Settings' and click on 'Events Manager' under 'Data Sources.'

Step 3: Set Up a New Pixel

  • In the Events Manager, click on 'Add Data Source' and choose 'Facebook Pixel.'
  • Follow the on-screen instructions to create a new Pixel, providing a name and your website URL.
  • Copy the entire Pixel code provided by Facebook.

Step 4: Access Squarespace Dashboard

  • Log in to your Squarespace account and go to your website's dashboard.

Step 5: Navigate to Settings

  • In the Squarespace dashboard, click on 'Settings.'

Step 6: Select Advanced Settings

  • Under Settings, select 'Advanced.'

Step 7: Inject Code

  • Scroll down to 'Code Injection.'
  • Paste the Facebook Pixel code into the 'Header' or 'Footer' section.
  • Click 'Save' to apply the changes.

Code Snippet Facebook Pixel

<!-- Squarespace Header Code Injection -->
<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>
<!-- End of Squarespace Header Code Injection -->

Replace YOUR_PIXEL_ID with the actual ID provided by Facebook.

Step 8: Verify Pixel Installation

  • Return to the Facebook Events Manager.
  • Click 'Continue' to verify that the Pixel has been successfully installed on your website.

Step 9: Set Up Events

  • In the Facebook Events Manager, click on 'Add Event' to set up specific events to track.
  • Follow the instructions to configure each event.

Step 10: Test Pixel Events

  • Use the Facebook Pixel Helper browser extension to verify that your events are being tracked correctly.

Step 11: Create Custom Conversions (Optional)

  • In the Events Manager, navigate to 'Aggregated Event Measurement.'
  • Create custom conversions for specific actions you want to track for ad optimization.

Code Snippet for Custom Events:

<!-- Squarespace Header Code Injection for Custom Event -->
<script>
fbq('track', 'EVENT_NAME', {
parameter1: 'value1',
parameter2: 'value2'
});
</script>
<!-- End of Squarespace Header Code Injection for Custom Event -->

Step 12: Monitor Pixel Performance

  • Regularly check the Events Manager for insights into your Pixel's performance and user interactions.

Congratulations! You’ve successfully integrated Meta Pixel with your Squarespace store. Utilize the collected data to enhance your Facebook ad strategy. If you still have questions or need assistance, the experts at LoftyDevs, specializing in Squarespace solutions, are ready to help you achieve your goals. Reach out to them for personalized support and optimization.

--

--

Bhavik
GrowWithSqsp

On a personal level, I consider myself a young dynamic open-minded person with a particular interest in entrepreneurship and new technologies.