FROM CACHE - en_header

A snippet does not look valid (UA-xxxx-x)

SMB
New Member
1 0 0

I’m trying to connect google analytics to my Shopify account and keep getting an error error message of analytics snippet does not look valid (UA-xxxx-x). I have googled and tried everything and it’s still not working! Does anyone know how to fix this ?

 

thanks in advance

Replies 16 (16)
jimmychen
New Member
2 0 5

when you create site in google analytics   , you need to click "Universal Analytics" options,it will create "UA-xxx"

if no click the option ,default create "G-xxx"

CosmosCooking
New Member
1 0 0

this is also happening to me. Do you know where i can go to change that setting? i have tried to google everything but cannot find it at all.

LukaszWiktor
Shopify Partner
292 19 99

It looks like it's not possible to change the setting. You'd need to create a new property. When creating the property, click on Show advanced options and enable Create a Universal Analytics property

image.png

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

Same happened to me.

Thanks to @LukaszWiktor recommendation I was able to solve it. I would just add that once the "Create a Universal Analytics property" is checked, Google by default creates two properties, the G-XXX one and the UA-XXX; and you are redirected to the G-XXX by default too. So what you need to do is select the UA-XXX property so you can copy / paste the correct tag.

JavierCastro90
Tourist
4 0 1

Buenas,donde hay que entrar para  seleccionar la propiedad UA-XXX para poder copiar / pegar la etiqueta correcta ?

No lo localizo y me sigue dando fallo.Gracias

capitanyuri
New Member
1 0 0

i created a universal analytics property,
but the code does not work on the site, I have seen your answer but I cannot find from where to select the UA-XXX property could you give more precise indications? thank you

birella
New Member
3 0 0

i still haven't managed to link the google code to the shopify account correctly shopify constantly slanders that there is no g-xxx code but i can't find it anywhere. could someone paste me here that i can copy it and get on the spotify

birella
New Member
3 0 0

i still haven't managed to link the google code to the shopify account correctly shopify constantly slanders that there is no g-xxx code but i can't find it anywhere. could someone paste me here that i can copy it and get on the spotify

Williamquinn
New Member
1 0 0

Find your template, select the edit code option, and then find the theme.liquid page, copy your Google code, and paste it within the <head></head> tag.

BeccaBooks
New Member
1 0 0

You select it in the drop down menu under the blue "create property" button.

SleepVendors
New Member
2 0 0

thanks is there a difference between universal & the other ?

FilipposD
Shopify Partner
45 1 18

Here's an overview from this article.

FilipposD_0-1626682958588.png

 

Jimeoe
New Member
1 0 0

Once 'Create a Universal Analytics property' has been selected there will be two options below web URL

1. Create both a Google Analytics 4 and a Universal Analytics property (this will be preselceted)

2. Create a Universal Analytics property only -  SELECT THIS

 

Screenshot 2021-08-17 12.07.jpg

JasonFB
New Member
1 0 1

What a UX problem for Shopify here.

The current state of this Shopify-Google disaster is this:

1. Not only has Google upgraded their interface so you can't get the the UA number very easily, but it won't generate any code snippet with the UA number any longer.

2. As well, as others have said you have to go into the "Advanced" section and ignore the fact Google is telling you this is "not recommended for new people" (since you need the legacy UA account go ahead and do this)

 

Analytics 2021-11-26 10-26-03.png

 

3. Then once you get the stream, you still don't get a code snippet with the UA

first choose "Connected Site Tags" and THEN you will find your UA number

 

Analytics 2021-11-26 10-31-15.png

 

Analytics 2021-11-26 10-31-32.png

 

 

4. On the Shopify interface, the large text area field suggests that you copy & paste your entire code snipped (which I supposed worked in the past when Google generated code with the UA number), but actually in a sneaky way is just GREPPING for your UA number, yanks it out of the code, and saves the whole field as the UA number.

 

Helios Merch Shop ~ Preferences ~ Shopify 2021-11-26 10-30-50.png

 

Counter-intuitively, you actually just need to copy & paste the UA number from the Google interface into this abnormally-large field as above. 

 

It's 2021 now. Shopify should address this to promote innovation, growth, and the launching of new stores with a frictionless experience.

Malyn
New Member
1 0 0

This helps me! Thank you so much!

chriskew1
New Member
1 0 0

Hi Jason. Just wanted to thank you for the above. It was a fantastic help!