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

Highlighted
Tourist
5 0 15

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. 

Highlighted

For this, write an email to Shopify experts!

 

GET FREE PAYSTUB INSTANTLY > 1st default stub free worth $4.99
0 Likes
Highlighted
New Member
2 0 8

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.

Highlighted
Tourist
5 0 15

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. 

Highlighted
Tourist
4 0 4

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. 

Highlighted
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

Highlighted
New Member
2 0 8

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  

 

 

Highlighted
New Member
2 0 5

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

 

 

 

Highlighted
New Member
1 0 3

"

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

Highlighted
New Member
2 0 5
Thank you. It worked.