System updates

We’re experiencing issues that may affect your Square services. We’ll continue to update our status page with more information.

Home>Site and eCommerce Setup

Add Custom Tracking Code to Square Online

Note: We cannot provide in-depth troubleshooting for problems arising from the use of third-party HTML/CSS code in our Support Centre. For assistance with the code itself, please consult a code expert.

If you need to add a Facebook pixel or Google Analytics tracking code to your website, you can add tracking tools to Square Online.

Note: This article describes how to insert certain types of code that are not intended to be visible and need to be inserted into the header of your website (e.g. Google Analytics or Facebook Pixel). This is in contrast to embedded code that will display on your website pages (e.g. an event calendar or reservation widget). Learn more about adding embed code to your website for details on how to use the embed code section in the site editor.

Google Analytics can also help you track your online store’s performance to monitor your items, transactions and other statistics related to commerce. Learn more about commerce tracking for Square Online with Google Analytics for additional details on tracking your online store.

Add Custom Tracking Code with the Built-in Options


In your Square Online Overview page, go to Settings > Tracking Tools. There are several built-in options here that allow you to paste in your code or ID and have it automatically added to your website after you publish it from the Square Online site editor.

Google Analytics

Use this to add Google Analytics tracking to monitor traffic and other statistics on your website. Find your tracking ID in your Analytics account, paste it in here, then publish your site.

Google Verification

Use this when you want to verify your website with Google. Get the verification meta tag from Google, paste it here and publish your site. You can then complete the verification process with Google.

Learn more about how to verify your site with search engines like Google.

Pinterest Verification and Conversion Tag

Use this option to verify your domain with Pinterest and add a tag to track conversions from Promoted Pins. Once you paste your code, publish your site.

Facebook Pixel

Use this to enter your Facebook pixel ID from Facebook Ads, then publish your site and complete the process through Facebook.

You can also learn more about how to connect Square Online to Facebook and Instagram.

Bing Verification

Use this when you want to verify your website with Bing. Get the verification meta tag from Bing, paste it here and publish your site.

Learn more about how to verify your site with search engines like Bing.

Add Your Own Custom Tracking Code


To enable additional tracking for your Google Analytics code or add something that isn’t already built in, you can insert custom code into the header or footer of your website.

Select +Add new code on the Tracking Tools page and enter a name for this code. Paste the code into the “Custom code” field, then choose where you want the code to be inserted on your website. For the header, select the <head> option. For the footer, select the End of <body> option. When you’re finished, select Save and publish your site from the editor. Any code you add here will be inserted on every page of your site.

Note: Adding custom code can cause your website to display strangely, and can even break your online store or create unexpected compatibility issues. Use this feature with caution, and double-check to make sure any code you add is complete and correct.

Can't find what you need?