How to add Meta Tags and Custom Scripts
You can add custom scripts, meta tags, and other code to your store through the Store Settings. This is useful for adding analytics tracking, advertising code and verification tags.
Where to Find It
Go to your store admin area and select Store > Settings > Store from the left menu. Scroll down to the Custom Scripts, Meta Tags & ads.txt section. You will find two code fields:
- Header Scripts and Meta Tags. Code added here appears in the
<head>section of every page on your store. This is where most scripts and meta tags should go. - Footer Scripts. Code added here appears just before the closing
</body>tag. Some scripts perform better when loaded in the footer.
Both fields apply to every page of your store. For code on one page only, such as an embed or a form, add a Custom HTML section to that page in Design > Editor. It works on your homepage and on pages you create.
Common Uses
Google Analytics / GA4
Paste your Google Analytics tracking code into the Header Scripts field. This lets you track visitors, page views, and behaviour on your store.
Google Search Console Verification
Google may ask you to add a meta tag to verify ownership of your site. Paste the meta tag they give you into the Header Scripts field.
Pinterest, Facebook and other site verification
Any service that asks you to prove you own the site by adding a meta tag to your home page is handled the same way: paste the tag into the Header Scripts field, save, and clear your store cache. Pinterest calls this claiming your website, and its tag looks like <meta name="p:domain_verify" content="your-code-here">.
🔗 How to add your store products to Pinterest
Google Adsense
After opening an Adsense account, paste the Adsense code into the Header Scripts field.
🔗 How to add Google Adsense to your store
Facebook Pixel
If you are running Facebook ads, paste your Facebook Pixel code into the Header Scripts field to track conversions and build retargeting audiences.
Custom CSS
Add CSS at Design > Custom CSS instead. It has its own editor, and you do not need a <style> tag there. CSS you added to Header Scripts earlier keeps working.
🔗 Can I add custom CSS to my store?
ads.txt
If you use Google Adsense or other ad networks, you may need to add ads.txt content. There is a separate field for this on the same settings page.
How to Add Code
- Go to Store > Settings > Store in your store dashboard
- Scroll down to the Header Scripts and Meta Tags field (or Footer Scripts)
- Paste your code into the field
- Click Save
- Clear your store cache to make the changes live
🔗 How to clear your store cache
Be careful when adding code to these fields. Incorrect scripts can break your store layout or slow down page loading. If something goes wrong, remove the code you added, save, and clear your cache.
Tips
- Don't add the same script twice. If you have already added Google Analytics in one place, don't add it again. Duplicate tracking scripts can cause inaccurate data.
- Test after adding. After adding any code, visit your store and check that everything still looks and works correctly.
- Keep a backup. Copy the contents of your script fields to a text file before making changes, so you can easily restore them.