Manually inserting GA4 snippet into theme.liquid - Archetype Impulse theme

Topic summary

  • Manual insertion of a GA4 tracking snippet into Shopify’s Impulse theme (theme.liquid) broke the site; removing the snippet restored it but left analytics inactive. Google/YouTube sales channels were intentionally not connected to preserve brand exclusivity.

  • GA4 (Google Analytics 4) is Google’s analytics platform; theme.liquid is a core Shopify theme template; Google Tag Manager (GTM) is a tool to manage tracking tags without editing theme code.

  • A respondent recommended implementing GA4 via GTM for better control of tag firing and shared a free guide plus GTM containers tailored to Shopify.

  • The original poster later stated they set up GA4 through GTM and found the shared resources helpful.

  • They clarified the decision to avoid broad sales channels stems from maintaining exclusivity and avoiding low-return, broad audiences.

  • No root cause was identified for why the manual GA4 snippet “obliterated” the site, and there’s no confirmation GA4 tracking is fully working now. The manual theme insertion issue remains unresolved; discussion is partially addressed but open.

Summarized with AI on January 24. AI used: gpt-5.

Hi All,

I did not connect Google / You Tube as sales channels to our site as our business is bespoke and lives on exclusivity. (Broadcasting product is not an objective.)

I followed both Shopify and Google’s guidance and entered our GA4 snippet into theme.liquid as directed. It completely obliterated the site.

Good news: when I deleted the snippet, the site recovered.

Bad news: no GA.

Any suggestions? Any technically smart folks out there that can help?

(Archetype has nothing on it at all. Yes, I’m using the latest theme version 7.3.4.)

Any help is greatly appreciated!!

1 Like

G’day. Bespoke is a very broad term category to confidently say you should do a then b, etc to get you set up on GA4. Why would the sales channel be insufficient for you?

I suggest doing it via Google Tag Manager to more easily control the tags and all firings. I created a few tags for Shopify merchants to help them with custom GA4 setups. You can get the guide and all containers for free at https://www.digitaldarts.com.au/google-analytics-shopify

Hi Josh,

Thank you. I did setup through tag manager. ; D

r

Hi Josh,

FYI. I loved your digitaldarts info on GA4.

“Bespoke” may not have been the term I should have used. Exclusive may be a better term. We trade on exclusivity, not broad channels. It’s not about the “insufficiency” of certain channels, it’s more about their overexposure to broad audiences that do not fit us. They are high risk, low return for us.