FROM CACHE - en_header

Google Analytics no longer has UA-XXXX codes, but shopify only accepts that

Eee1
Tourist
5 0 26

This article https://help.shopify.com/en/manual/reports-and-analytics/google-analytics  and the associated UI in shopify -> online store -> preferences needs a lot of improvement. 

First, the article states to go into Google Analytics and to copy the code. The word code here is problematic because in Google Analytics it is showing the full header html code. 

Second, everywhere, in this article and many youtube videos, the tracking code starts with UA-XXXX. But Google Analytics has a new version (not called tracking code, but called Measurement ID), which is G-GXXXXX. And in shopify -> online store -> preferences, you can't enter that code because it doesn't fit the UA-XXXX format. 

Replies 14 (14)
Neo_5678
Explorer
65 3 30

For this, write an email to Shopify experts!

 

GET FREE PAYSTUB INSTANTLY > 1st default stub free worth $4.99
jutasl
New Member
2 0 12

Have you managed to find a solution? I've contacted the support with the same question, but they weren't able to have with this issue yet.

Eee1
Tourist
5 0 26

Admin -> Data Streams -> and then copy the entire HTML code from "Global Site Tag (gtag.js)". Then go to shopify -> themes -> edit/customize, and find theme.liquid in LAYOUT. Then paste that html code below the head tag <head>. 

This worked but I still don't know if that is right way if I want "enhanced ecommerce" from google analytics. 

LBPlants
Tourist
4 0 5

Thanks for opening this discussion...

 

Wasted hours upon hours in frustration mode because I couldnt find the UA- code... ARGH! Hope we will have our answers soon. 

DerKid
New Member
1 0 4

Me, too. I can't figure out how it works. I could connect my other store last month, but today while I tried to connect my new one, I failed.

I found the announcement from Google that, since 14th or 15th Oct, the GA has updated to GA '4' , which means a upgraded version.

So guys, we probably have to hold our beers and wait

jutasl
New Member
2 0 12

Hey everyone!

Shopify support got back to me about this issue:

The Google Analytics account field accepts only a Universal Analytics Google Account ID, and not the full code snippet; this would be because we will take the ID and automatically embed it to the online store and checkout. The account ID in your snippet is G-XXX, which is not a Universal Analytics account ID.

Recently, as of October 2020, Google has released a new analytics system known as Google Analytics 4. New Google Analytics users will default to that system and create properties with the above IDs. For now, Shopify still requires the previous system, known as Universal Analytics. When setting up your Google Analytics properties, you will need to choose these under Advanced Options to create a Universal Analytics property for Shopify:

jutasl_0-1603816425781.jpeg

You can then use just the Universal Analytics account ID generated from there beginning in UA- in the Google Analytics account field of your Shopify settings.

I haven't found a way to change it in an already existing property, but it's available when creating a new one 🙂 

 

 

anatoi
Tourist
3 0 12

I've fixed it this way.

I created a new property under the current user name.

Create property.

Go to advanced options 

And then select Create a Universal Analytics Property. 

 

So, it will give you the UA name you need. 

Hope it helps

 

 

 

LettieBea
New Member
1 0 4

"

I've fixed it this way.

I created a new property under the current user name.

Create property.

Go to advanced options 

And then select Create a Universal Analytics Property. 

 

So, it will give you the UA name you need. 

Hope it helps" 


THIS WORKS

Skylar93
New Member
1 0 0

Thanks, that worked. I was about to smash something trying to figure out why the UA code was just not appearing anymore.

Seybeats
New Member
1 0 0

Hi,

 

It has changed again. When You list a property with analytics it doesn't give you the advanced option anymore. Anyone know how to get around? It only generates the G tag code...

LukaszWiktor
Shopify Partner
304 24 111

Hi @Seybeats,

Yeah, unfortunately, it's not possible to get a UA code for an already created Google Analytics 4 property. You can only enable the UA-XXXX code when creating a new property. It's hidden in advanced options.

LukaszWiktor_2-1608026323711.png

 

LukaszWiktor_3-1608027041150.png

 

 

 

 

I'm a software engineer. I make things happen automatically.
Check out my apps Exporteo, Fulfilleo, Stockeo, and Personal Discount.
CraftAlong
New Member
1 0 0

It's been a few months, and I'm wondering - will there be an update to account for the new google analytics measurement ID? Is this a feature that's in development? 

 

Thanks,

 

ekuplu
Shopify Partner
43 0 15

You can still create a UA account as it is explained in the messages above. However, it is suggested to use both Universal Analytics and GA4 as GA4 is relatively new. You can follow my video tutorial on how you can have the GA4 including e-commerce tracking - https://www.youtube.com/watch?v=K0kUtXVi0cE 

Complete Tutorial: Setup GA4 on Shopify including E-comm Reports

Data Analytics & Marketing Focused Content Platform for Shopify Merchants: Analyzify Hub

Check out our free Shopify - Google Tag Manager Course on Youtube