Skip to content
Help
Builder design and settings

Can I add custom code, scripts, or meta tags to my store (HTML, CSS, JavaScript, head section)?

Where you can add your own HTML, CSS, and JavaScript in the builder (Custom code section, Custom CSS, Custom Javascript), why you cannot paste code into the head section, and which app to use instead for Google Search Console verification, Google Tag Manager, and pixels.

3 min read

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

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 use container.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.

Still need help?

Write to us and we will answer you.

Contact us