How to Add GA4 (Google Analytics 4 ver 2021) to Shopify site?

  1. Create new property
  2. Copy the Global Tag settings
  1. The old way is getting UA-xxx, plug the code inside using Online Store > Preferrence > Google Analytics. It doesn’t work that way anymore, insead, you will get this error.This is where I started tinkering around and finally insert the tag. Read on….
  2. Go to Oneline Store > Theme > Edit Code. BE VERY VERY CAREFUL HERE!!!!
  1. Template.liquid . Look for head opening code line. Paste in there.
  1. Once you copy-paste it. It should be total of 9 lines. SAVE of course!
  2. TEST:
    Use Google Chrome extension — TAG manager by Google.
    6.1 Hit Enable.
    6.2 Refresh
    6.3 Check installation / trackers
  1. ABOVE WORKS for a Corporate site and IF your website is in WORDPRESS. However, if your site is on SHOPIFY — continue to Step 7:
  2. Ecommerce sales data variables such as order ID, currency total price, shipping price, tax and sending it to Google Analytics 4 to record the sales. Paste it here:
  1. Move to Debug & Verification

--

--

--

Business & Marketing. Digital Content Creator. Wanderer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

If You’re Not Visible Online You Won’t Make Any Money: Do This 1 Thing To Fix That

Is personalized marketing good for your business?

How to Use Pinterest to Get Clients

Origins #45 — Improving visuals and branding

Hashtag Help: Top creative tags to use in 2017

Your customers don’t care about your features…

A journey to highly commended #CX Leader of the Year 2021

Introducing Starly Community Ambassador Program: Join the Movement!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Casey

Casey

Business & Marketing. Digital Content Creator. Wanderer.

More from Medium

In conversation with our CEO Aroon Khatter: On Setting up a Digital Vending Business

Aroon Khatter

Global Coherence Jan 2 2022: Creating New Hope

Moving Machine Image from one project to another project as VM

How to Design Your Website for Extraordinary User Experience?