Put Drift's JavaScript snippet in Settings → Advanced → Code Injection → Footer (or, on sites still using the older 7.0 interface, Settings → Advanced → Code Injection), because Drift's embed loads and runs correctly when placed after the page content, and Squarespace's site-wide code injection is the supported location for third-party chat widgets; a per-page Code Block also works but must be repeated on every page you want Drift active.
What "Drift" and "Squarespace" mean here, and what is unknown
"Drift" in this context is the conversational-marketing and chat platform (Drift.com, now part of Salesloft) whose embed is a small JavaScript snippet that loads the chat widget and tracking. That is the ordinary reading of the query in a programming/software context. If you meant a different "Drift" — for example a JavaScript animation library, a data-drift visualization, or a scrolling library — the location question changes, because a display script usually needs a specific element in the page body rather than a site-wide footer.
Several things are genuinely unknown from the question and cannot be verified without your account or a current Drift dashboard:
Which Squarespace version you are on. Squarespace 7.1 and 7.0 differ in menu naming and in whether some code-injection options are exposed. Which Drift plan and embed you have. Drift's own installation instructions and snippet format have changed over time, and the exact code you paste is generated by Drift, not by Squarespace. Whether your plan allows code injection. Code Injection is a feature of Squarespace's higher-tier (Business and Commerce) plans in the current product structure; lower tiers historically did not expose Settings → Advanced → Code Injection. This is plan-dependent and should be checked in your own account. Whether Drift is already installed through another route, which would cause a duplicate widget.
What is answerable is the general, stable placement logic: third-party chat/tracking embeds belong in site-wide footer code injection when you want them on every page, and in a Code Block when you want them on selected pages only.
The primary location: site-wide Footer code injection
The standard, supported place for a third-party JavaScript embed that should run across the whole site is the Footer field of Code Injection.
In the current Squarespace editor the path is:
1: Open the site's main menu and go to Settings. 2: Choose Advanced (in some versions this appears as Developer Tools or sits under Website). 3: Select Code Injection. 4: Paste the Drift snippet into the Footer box. 5: Save.
The Header box is also present, but it is the wrong choice for most chat widgets. Header code is injected into the and is intended for things that must be defined before the page renders — analytics bootstraps, meta tags, CSS, or libraries that must load early. A chat widget needs the page body to exist so it has something to attach to; placing it in the footer means it loads after the content, which matches how the widget is designed to initialize and avoids blocking the visible page.
Why footer rather than header
When a script runs before the DOM is ready, code that tries to find or attach to page elements can fail or throw errors. Footer injection runs later in the document, so the page structure is present. Chat widgets in particular tend to be written to append their own container to the body and to bind to window events; loading them last is the conventional and safest pattern. It also keeps the widget from delaying first paint, which matters for perceived load speed. This is a general principle for third-party embeds, not a Squarespace-specific rule, and it is why vendor installation guides for chat tools typically say "before the closing tag" — footer injection is Squarespace's equivalent of that position.
A note on the exact snippet
Paste exactly what Drift generates for your account, including the