How to Add Custom Code to Your Square Online Website
If you’re using Square Online and want to plug in tools like Google Analytics, Facebook Pixel, TikTok Pixel, or other tracking scripts, you don’t need to touch your site’s raw HTML.
Square Online gives you a built-in way to inject custom code into the <head> or the end of the <body> of every page on your site using Tracking Tools in the Square Dashboard. This is designed primarily for third-party tracking and verification scripts—not for redesigning your theme—so it’s safe and straightforward when used correctly.
Before You Start
A few quick notes before you paste anything:
Use it for tracking & integrations
This feature is meant for analytics, pixels, verification tags, and chat widgets.Use the full script snippet
Most tools give you a complete<script>...</script>or HTML snippet. Paste it exactly as provided.Know where your code will run
Head for scripts that must load early.
End of Body for scripts that can load later for performance.
How to Add Custom Code Site-Wide in Square Online
Step 1: Open Square Dashboard
Sign in to your Square Dashboard.
Go to Online or Websites in the left menu.
Step 2: Go to Tracking Tools
Select Settings in the sidebar.
Click Tracking Tools.
Step 3: Add a New Code Snippet
Click Add new code.
Enter a Code name (for your own organization).
Paste your code into the Custom code box.
Step 4: Choose Where the Code Goes
You’ll see two placement options:
Head code – loads the script early
End of body – runs later in the page
If the provider doesn’t specify, head is a safe default for analytics and meta verification. Heavier widgets are usually better in end of body.
Step 5: Save and Publish
Save your changes.
Go to your site editor and click Publish.
Your custom code will now load across your website.
Adding Code to a Single Page
If you only want the code on one page:
Go to Websites → Edit site.
Open the page where you want the widget or script.
Select + Add → Section → Embed code.
Paste the snippet.
Publish.
This is ideal for booking widgets, forms, or third-party embeds that should only live on one page.
Best Practices and Common Pitfalls
Only add trusted code
Avoid unknown scripts. Anything you paste will run on every page of your site.
Don’t treat it like a theme editor
Tracking Tools isn’t meant for layout rewrites or heavy styling. Test thoroughly if you add CSS or advanced JavaScript.
Verify your integrations
After publishing:
Test analytics or pixels using validation tools.
Load your site in a private window to ensure no layout issues.
If something breaks, return to Tracking Tools, remove the code, and republish.
Quick FAQ
Can I add multiple custom codes?
Yes—just repeat the Add new code steps.
Can I paste CSS?
You can include <style> tags within a code snippet, but use caution. Design updates from Square may override your changes.
Does code load on checkout pages?
Some features—especially conversion tracking—may need testing to ensure checkout pages execute your script.
Adding code to Square Online is simple once you know where to look. Tracking Tools handles global scripts, while Embed Sections provide flexibility for page-specific features.

