The short answer
You can add your own code in three places in the builder: a Custom code section inside a page, the Custom CSS settings, and the Custom Javascript settings. There is no box to paste code into the head section of your store. For head tags, use the matching app (see the list below).
Which tool for which job
- Verify my store with Google Search Console, or add a
google-site-verificationmeta tag: the Domain Verifier app. It also handles Facebook (Meta) domain verification, TikTok, and Snapchat. - Google Analytics, Google Ads tags, or any tag you manage in Google Tag Manager: the Google Tag Manager app.
- Facebook, TikTok, Snapchat, ChatGPT, Pinterest, X, or Google Ads pixels: see Facebook, TikTok, Snapchat, ChatGPT, Pinterest, and X, or Google Ads conversions.
- Google Merchant Center product feed: see Google Merchant Center. Use Domain Verifier for Search Console.
- Heatmaps and session recordings: see Microsoft Clarity or Contentsquare.
- A widget or embed inside a page (a booking form, a video, a map): the Custom code section below.
- Styles for the whole store or one section: see Custom CSS.
- A script on every page: see Custom JavaScript.
Why code in the builder cannot verify your site
Google, Meta, and other platforms check for their tag in the head of your page when they verify. A Custom code section places your code inside the page body, where the section sits. Custom Javascript runs in the shopper's browser after the page loads. Neither one puts a tag in the head the way these platforms need, so verification fails. Domain Verifier adds the tag in the right place for you.
Custom code section
A section you add to any page, up to 2 per page. Open the Sections tab, click Add new section, and pick Custom code. It has three fields:
- HTML: markup shown inside this section.
- CSS: styles that apply to this section only, so they cannot break the rest of your page.
- JavaScript: runs each time the section is shown. Your code receives the section as
container, so usecontainer.querySelector(...)to reach your own markup.
You also set its width, color scheme, and padding like any section. Use Apply to all pages to copy it to other pages that already have a Custom code section.
Tips
- Check your code in the builder preview, then publish and test your live store on a phone and a computer.
- If the page looks broken after a change, remove the code, publish, and add it back piece by piece.
- Third-party scripts can slow your store down. Add only what you need.
- An AI assistant connected to your store can only change custom code if the store owner allows it. See Manage assistant access.