For anyone still struggling with this, here are the steps you need to take:
- Go to your analytics dashboard at analytics.google.com
- Click on the bottom left Admin button
- From there click Create property
- Enter a name for your property (ex. Shopify)
- On the bottom, click Show advanced options
- Check Create a Universal Analytics property
- Enter your website
- You can select the option to create both or just the Universal Analytics (this is the one Shopify needs)
- Hit Next and copy the property the ID that starts with UA-
To give a bit more context, Google recently made an update to create by default a Measurement ID (that starts with G-)instead of a Tracking ID (that starts with UA-). Shopify only accepts the tracking ID at the moment.
Hope this helps anyone else!
Hey Nick, Thousands of Shopify user unable to install Google Analytics on their Shopify store because of the recent Google Analytics change: Have a look at the recent code:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX"></script>
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
ABOVE THEY GOOGLE IS NOW GIVING - "G-XXXXXXXXX" which was previously: "UA-XXXXXXXX" ...I think this is the issue by Shopify. Shopify should consider this seriously. Thanks!
The error message is Analytics snippet does not look valid (UA-xxxx-x), so I think that has some validation in the shopify's application back-end and needs to be updated, because Google Analytics is now generate a code in the format G-XXXXXXXXX and no UA-XXXX-X, I'm in 12-2020 and this error is still happening. Fortunately I found a work around to put this in the code of the theme, but can have others persons that don't have this skill.