Add custom code to your website header and footer
One snippet.Seven different boxes.
Custom code goes in your platform’s own code field: a Header or Head code box for the head of every page, and a Footer or end-of-body box for the foot. Squarespace, Webflow and Framer need a paid plan before that box exists, Wix needs a published site with a connected domain, and some pages, such as checkout, never run it. The picker below gives the menu path for each platform, and the checker tells you whether your code loaded.
By the Builderify team
An example, made up for this page
Where does custom code go
on each platform?
Seven platforms, two boxes.
Custom code goes in your platform’s own code field. The header box puts it in the head of every page and the footer box puts it at the end of the body, and every platform names them differently. Here is where each one lives, and what you need first.
| Platform | Open | Head | Footer | You need |
|---|---|---|---|---|
| Squarespace | Pages › Custom Code › Code Injection | The Header field | The Footer field | The Core, Plus or Advanced plan, or some legacy plans. |
| Wix | Settings › Custom Code | Place Code in: Head | Place Code in: Body – end | A published site with a connected domain. |
| Webflow | Site settings › Custom code | Head code | Footer code | A paid Site plan, or a paid Workspace. |
| Shopify | Online Store › Themes › … › Edit code | theme.liquid, just above </head> | theme.liquid, just above </body> | A theme you own: a paid theme on trial has to be bought first. |
| WordPress | Code Snippets › Header & Footer | The Header box | The Footer box | A header and footer plugin, or a child theme. On WordPress.com, a paid plan. |
| Framer | Project Settings › Custom Code | Start or end of the head | End of the body | A paid plan, not Free. |
| Plain HTML | Your page template | Inside the head | Just before </body> | Access to your page files. |
Read on 1 November 2026 from each platform’s own help pages. Plans and menus change, so open the source beside the row you use. The picker in chapter 03 has the steps.
Which box do I paste it in?
Pick your platform and what the instructions say.
Choose your platform, then where the code’s own instructions say it goes, and the picker names the exact box, what you need, the steps and the catch. It starts with Squarespace and the head; change either. The same boxes serve a popup, a cookie banner or an AI chatbot.
Squarespace · In the head
The Header field
Squarespace injects it into the head of every page.
- You need
- Squarespace lists code injection on the Core, Plus and Advanced plans and on some legacy billing plans.
- Only one page?
- Hover the page in the Pages panel, click the gear, then Advanced. Page Header Code Injection adds code to the head of that page only.
- The catch
- Checkout pages don’t support code. The order status page, which customers see after checkout, has a code field of its own, and so does the Lock page.
Steps on Squarespace
- 1Open the Code Injection panel. On version 7.1 that is Pages › Custom Code › Code Injection. On version 7.0 it is Settings › Advanced › Code Injection. If your menu says Website Tools instead of Custom Code, look inside it.
- 2Paste the code into Header or Footer. JavaScript needs its script tags around it.
- 3Click Save.
- 4Open the live address in a private window. Squarespace can switch scripts off inside the editor when they get in the way.
Every place on Squarespace
| In the head | The Header field |
|---|---|
| First in the head | The top of the Header field |
| Start of the body | No start-of-body field |
| End of the body (footer) | The Footer field |
Source: Squarespace Help
Not on the list?
Ghost, Kajabi, Carrd, GoHighLevel and Google Tag Manager each have a code box of their own. Builderify’s Install page lists their steps, and the logic is the same: find the box that prints into the head.
The vendor wins
If a tool’s instructions name a different place from the one here, use theirs. Wix and Framer both say to follow the third-party provider’s instructions for placement.
Two snippets, two boxes
Some tools give you a head snippet and a body snippet. Run the picker twice, once for each, and check that both show up in the source.
How do I check that my custom code loaded?
Search the page’s source for a line of it.
Open the live page in a private window, view its source and search for a line of your code: it should appear once, in the place you chose. The checker does the searching. Paste the source and a line of the code, and it says how many times the code appears, where it sits and what would stop it running. Nothing you paste leaves this page.
Open the live page in a private window, right-click it and choose View page source, select all and copy.
What you will see here
A verdict, then every place the line appears in the source. Each match is marked with where it sits (the head, the start or end of the body) and with anything that would stop it running: a comment, text instead of code, a noscript block, a script type the browser skips, or curly quotes.
Paste a page and a line of your code on the left, or press Try an example.
Source, not inspector
View page source shows the HTML your site sent. A tag that another tool adds after the page loads, such as one set up inside Google Tag Manager, isn’t in it. For those, open the Network tab in your browser’s developer tools and look for the request.
Position is a guide
The checker calls a match near the start or end of the body when it sits in the first or last tenth of it. It can’t tell your platform’s own footer markup from your code, so treat the position as a hint and read the excerpt.
Found isn’t working
The source shows the tag is on the page, not that it ran. If it is there once and the tool still reports nothing, check the vendor’s own install check, and your browser’s console for errors.
Why isn’t my custom code working?
Eight usual reasons.
Most of the time the code is fine and the page you are looking at isn’t the page that has it. Work down the list, and use the checker to see what the live page really contains.
Squarespace, Webflow and Wix each say their support team can’t help with problems in custom code, so a note of what you added and where is worth keeping.
-
01
Checkout pages don’t run it
Squarespace says checkout pages don’t support code, though its order status page has a code field of its own. Shopify’s theme layouts cover non-checkout pages,
checkout.liquidis unsupported for the Information, Shipping and Payment steps, and it was sunset for the Thank you and Order status pages on 28 August 2025. Script tags on those pages were sunset the same day for Plus stores and on 26 August 2026 for the rest.The fix If a tag has to run after a purchase, look for the platform’s own place first: Squarespace’s order status field, or a custom pixel under Settings › Customer events on Shopify.
Read in Squarespace Help Shopify Dev
-
02
It’s saved but not published
Webflow shows custom code in preview, but it doesn’t go live until you publish. Framer doesn’t load custom code in its canvas preview at all. Wix asks for a published site.
The fix Publish, then test the live address, not the editor.
Read in Webflow Help Framer Academy Wix Help
-
03
You’re looking at the editor
Squarespace can switch scripts off inside the site editor when they get in the way, and says so at the bottom of the screen. Webflow’s expand canvas view doesn’t run custom code either.
The fix Open the live address in a private window.
Read in Squarespace Help Webflow Help
-
04
A cache is serving the old page
WPCode’s own reminder: a caching plugin serves a stored copy of your pages, so visitors keep seeing the old version until the cache is cleared.
The fix Clear the cache plugin and any CDN in front of the site, then reload.
Read in WPCode
-
05
It shows up as text on the page
WPCode prints each box exactly as you typed it, so a snippet without its script tags appears as plain text. Webflow needs the opening and closing tags too, and no html, head or body tags.
The fix Paste the whole snippet, from the opening script tag to the closing one, into a code field and not into a text block.
Read in WPCode Webflow Help
-
06
It’s on the page twice
Shopify tells you to remove old pixel code from
theme.liquidbefore adding a custom pixel, so events aren’t counted twice. A plugin and a hand-pasted copy can do the same to any tag.The fix Search the source for a line of the code. It should appear once (chapter 04).
Read in Shopify custom pixels
-
07
A theme update removed it
Shopify says code changes that are incompatible with a theme update are removed in the updated copy, and WordPress says code added to a parent theme disappears when the theme updates. WPCode and a child theme keep your code when the theme changes.
The fix On WordPress keep the code in a plugin or a child theme. On Shopify, note where you added it.
Read in Shopify Help Child themes WPCode
-
08
Wix blocks it, or ignores it
Wix says Google Analytics, Google Tag Manager and the Facebook and TikTok pixels don’t work through custom code. Since December 2025 its frontend security measures may block snippets that used to work, until the provider updates them. Changing the site’s domain deletes its snippets.
The fix Use Wix’s marketing integrations for those tags, ask the snippet’s provider about Wix’s security change, and add snippets again after a domain change.
Read in Wix Help
Adding Builderify takes
one line in the head.
Every Builderify module runs from one script tag. Paste it once, in the head, using the steps for your platform in chapter 03, and switch the popups, the Floating Bubble and the rest on in the dashboard from then on. You don’t touch the code again.
<head> <script src="https://app.builderify.com/bdf-connect.js?id=your-site-id" async></script> <!-- …everything else in your head -->
Your own tag, with your site’s ID in it, is on the Install page of the dashboard. On WordPress the Builderify plugin prints it for you, so there is no box to find.
For what to build once it is in, see how to add a popup to your website and add a cookie banner.
It loads with async
The browser keeps reading your page while it fetches the tag, so the head isn’t held up waiting for it. That is the attribute in the table in chapter 02.
The Install page checks for you
It lists the steps for every platform above and a few more, such as Ghost, Kajabi and Google Tag Manager. Once it sees the tag it says “Installed” with your domain, instead of “Not detected yet”, and Check now runs the check again.
Cookie Consent adds a second tag
It goes first in the head, so it decides what the other tags may do before they run. If you use Google Tag Manager, the Install page says to keep the cookie banner outside it for the same reason.
Start on the free plan: 250 credits a month and no monthly fee. The cookie consent banner is a separate switch from the same place, and the pricing page has the whole rate card.
Start freeCustom code in the header and footer, answered.
Open your platform's code field and paste the snippet, with its script tags, into the Header or Footer box. On Squarespace that is Pages › Custom Code › Code Injection, on Wix Settings › Custom Code, on Webflow Site settings › Custom code, on Shopify the theme.liquid file under Edit code, on WordPress a plugin such as WPCode, and on Framer Project Settings › Custom Code. Save, publish if the platform asks, then check the live page.
Put it where the tool's own instructions say. If they do not say, use the header: WPCode calls it the safest choice, and Wix puts tracking and verification codes in the head. A script that can wait, such as a live chat widget, can go in the footer, and Webflow says script tags before the closing body tag let the page load its content first.
On most builders, yes. Squarespace lists code injection on Core, Plus and Advanced and some legacy billing plans. Webflow needs a paid Workspace or an active Site plan, and Wix needs a published site with a connected domain. Framer's help names no plan, and a Framer product specialist said custom code is not possible on Free. Shopify needs a theme you have bought. Self-hosted WordPress needs no plan.
Usually you are not looking at the live page. The change may not be published, since Webflow and Framer need a publish. A cache may be serving the old page, or you may be in the editor, where Squarespace can switch scripts off. The code may also sit on a page type that does not run it, such as checkout. View the live page's source in a private window and search for a line of the code.
Not in the usual box. Squarespace says checkout pages do not support code, though its order status page has a code field of its own. Shopify's theme layouts cover non-checkout pages, and checkout.liquid is unsupported for the checkout steps and was sunset for the Thank you and Order status pages. Use the platform's own route for checkout tracking, such as a Shopify custom pixel.
Install a header and footer plugin such as WPCode and paste the code into its Header, Body or Footer box, under Code Snippets › Header & Footer. WPCode prints each box as you typed it, so include the script tags, and the code stays when the theme updates. On WordPress.com, plugins need a paid plan. Without a plugin, a child theme's functions.php with a wp_head or wp_footer action does the same job.
Copy the one-line tag from the Install page of the Builderify dashboard and paste it in the head, using the steps for your platform. It carries async, so the browser keeps reading the page while it loads, and every module then runs from that one tag. The Install page shows Installed on your domain once it sees the tag, and Check now runs the check again. You get 250 free credits a month and no monthly fee.
Only paste code from a source you trust, because it runs on every page you add it to. Squarespace, Webflow and Wix each say their support teams cannot help with problems in custom code, so keep a note of what you added and where. On Wix, switch snippets off one at a time to find the one that breaks the site.
Sources
- Squarespace Help Customize parts of your site with code injection
- Wix Help Embedding custom code on your site
- Webflow Help Custom code in head and body tags
- Shopify Help Editing theme code
- Shopify Dev Theme layouts
- Shopify Help Manage your custom pixels
- Framer Help How to add custom code
- Framer Academy Add Custom Code to your site in Framer
- Framer Community Custom code editable on free plan?
- WPCode Using the Global Header & Footer settings
- WordPress.com Support Plugins
- WordPress Developer The wp_head hook
- WordPress Developer The wp_body_open function
- WordPress Developer The wp_footer hook
- WordPress Developer Child themes
- MDN Web Docs The script element: async and defer
The platform pages were read on 1 November 2026. Menus, names and plans change, so open the page beside the row you use. Framer’s help names no plan for custom code: that line rests on a Framer product specialist’s answer in its community. The Squarespace menu paths are the ones in the Squarespace chatbot guide, read from Squarespace’s help the same day. The Builderify details come from the product itself on that date and the rate card on this site. The site in the picture is made up.
Stop losing the visitors
you already paid for.
More leads from the traffic you already have, and follow-up that sends itself. Free to start. No card, no monthly fee.