<head> of every page with Code Injection.
Code Injection is part of the Core, Plus and Advanced plans, and of the older Business and Commerce plans. It isn’t available on the Basic plan.
async, defer or type="module": pagent needs to load before your page shows, so visitors never see the original flash.
Add the snippet with Code Injection
1
Open Code Injection
Open the Pages panel. At the bottom, click Custom Code → Code Injection. On Squarespace 7.0 sites, it’s under Website Tools at the bottom of the Pages panel. Can’t find it? Search for “Code Injection” in the panel’s search.
2
Paste the snippet
Paste your snippet into the Header field.
3
Save
Click Save.
pagent runs on your site’s pages. Squarespace doesn’t allow code on its checkout pages, so tests stop before checkout.
Check it worked
- Open your site in a private browser window, so no cached version shows.
- Back in pagent, click Check connection in the install step. If you’ve finished setup already, open Settings → Setup: it shows You are ready once pagent has received visits from your site.
- pagent loads your live site and looks for the snippet. When it finds it, you can start your first test.