Web head error

Topic summary

A user manually installed Google Analytics 4 and Google Tag Manager into their website’s code, which resulted in unexpected letters appearing in the site header.

Diagnosis:

  • The issue likely stems from a syntax error in the code modification
  • Common causes include misplaced quotation marks (") or incorrectly typed characters

Recommended Solution:

  • Revert the theme to its previous working version
  • Instead of manually editing the head code, use Shopify’s official Google Analytics integration guide
  • This approach avoids direct code modifications that can introduce errors

Status: Solution provided, awaiting implementation by the original poster.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Hello! A few days ago, I manually installed Google Analytics 4 and Google Tag Manager in my website code. Since then, I’ve been seeing letters in the header of my website.
Thank you!

This usually happens when you leave a quotation mark (") or some character typed incorrectly, it reverts the theme back to its normal version where it was working fine and adds the Google tag again.

So you don’t have to touch the head code, use this guide:

https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/google-analytics-setup