Shopify
Paste your code into theme.liquid, just before the closing head tag.
Before you start
- You can only edit the code of a theme you’ve published or bought (not a trial of a paid theme).
- Approve your business details in step 1 of your website’s Setup tab.
Add your code
- In step 2 of your website’s Setup tab, choose your website builder and copy your code.
- In Shopify admin, go to Online Store → Themes. Next to your current theme, press the … button and choose Edit code.
- Under Layout, open
theme.liquid. - Find the line
</head>(press Ctrl+F or ⌘+F to search). Paste your code on a new line just above it. - Press Save.
Your code also proves you own the website, so there’s nothing else to add (theme.liquid, just above </head>). Once it’s saved and published, press Check my website in your dashboard. Prefer DNS? See Prove you own your website.
If you change your theme later, paste the code into the new theme’s theme.liquid too.
Go back to your dashboard, open your website’s Results tab and press Check again now. Your new score should go up within a minute. See Check it worked.
Is there another code?
Yes, but you don’t need it. Under your code there’s a link, Rather use a code that updates itself? Use one code, not both.
- Your code (recommended). Every AI tool can read it. If you change your business details later, copy it again and replace the old one.
- Self-updating code. Always shows your latest details, so you never need to paste again. Some AI tools don’t run scripts and may miss it.