SEO, AdWords, affiliates, advertising, and promotions
Hi everyone,
I've just heard about GA4 and it sounds good.
I've just created a new property, but wonder how I implement it in my Shopify store?
Or will the existing account connection provide the new tracking ID?
Thanks.
Solved! Go to the solution
This is an accepted solution.
@Josh_Uebergang what you say makes sense, but if analytics is using analytics.js and if we want adwords tracking on the site, that's using gtag.js, don't we have dual google implementations? and wouldn't that cause problems? see attached image
We saw our bounce rate cut in half (suspiciously) and some GA events stop flowing in, which always leads me to believe there's a GA implementation problem. We cannot backtrack it to any changes we made on our site (non-plus). The events that ARE able to flow in are on the checkout pages, so I'm wondering if gtag.js is blocking them from getting tracked on the rest of the site (since gtag.js is not in our checkout, it's not blocking the events there?)
These errors we're experiencing just happen to coincide with the prevalence of GA4 and google pushing us to update, so it's all part of my investigation.
I am also trying to implement Google Analytics 4 on my store. Since I don't have Shopify Plus I can't edit checkout.liquid, so ideally we would have an update to the integrated Google Analytics feature in Online Store Preferences.
I contacted Shopify support a few days ago and am still waiting on a response. Ideally they would have rolled an integration out in tandem with GA4 -- especially since we're in Q4 now.
Following. Wondering this myself.
Implementing GA4 is quite simple - just copy the GA4 tracking code into theme.liquid right after the <head> tag. That's it.
You just need to add a couple of lines to the theme.liquid file. You can do it just fine on your own in one minutes.
If you don't have Shopify Plus you can't edit checkout.liquid, meaning you can't track cart conversion statistics. That's why Shopify offers an integrated solution. But they haven't updated it in a long time it would seem. It's possible to fire the GA4 tag by adding it in the Additional Lines of Code under Google Analytics Settings in Online Store Preferences, but you can't take advantage of enhanced ecommerce tracking.
Shopify Ecommerce tracking is based on analytics.js Enhanced Ecommerce and is passed into Google Analytics web property via native Shopify integration.
GA4 Ecommerce tracking is a completely different library, and I don't think it would work with the existing integration Shopify has.
Very surprised that Shopify didn't at least come out with a statement informing their community that they are working on this issue...
Yeah, I was hoping someone from Shopify would just let us know when GA4 will be fully supported.
I am having issue! I have pasted the .json tag to my header but it is not reading revenue... ? Just traffic
For those of you reading this that have the ability to modify your theme.liquid file, this video will walk you through the steps to generate a GA4 tracking code and inserting it within your theme file. As of today, this is the only way to take advantage of the powerful features of Google Analytics 4 until Shopify supports it by default.
However, this does not get it into the cart to track conversions in GA4 or Google Ads
I agree that the basic implementation is easy, but the features of enhanced e-commerce are now obsolete. They changed how their events are named. In order to have enhanced e-commerce data with GA4 you need to update the data layer with all of the new events.
What I'm hoping for is a Shopify update to have this done automatically like their current enhanced e-commerce option.
Google [provides instructions](https://support.google.com/analytics/answer/9744165?hl=en&utm_id=ad) for both upgrading existing GA accounts and configuring new accounts for Google Analytics v 4. The wizard _cannot_ transfer data using existing tags from Shopify due to the existing Shopify/GA configuration.
After upgrading to GA 4, a new tag must be installed manually in the Shopify theme. This tag includes the Measurement ID and is similar to the Tracking ID. It should look similar to this and should be pasted just before the </head> closing tag, generally in the theme.js file:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MEASUREMENT-ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MEASUREMENT-ID');
</script>
After installing, go to the site to check that it's installed. Google Analytics should pickup the tag event quickly in the Realtime section. No ecommerce transaction data available yet.
Thanks for the response, but I don't have the option to edit my theme. 😞
I have not done a full Analytics 4 setup yet, but reading Google's docs, Shopify's universal analytics should function just fine with it. According to Google's upgrade guide:
Now that you have set up your Google Analytics 4 property, you need to tag your site (with the global site tag, gtag.js). You won't replace the tagging that already exists for your Universal Analytics property, instead you'll add to it. So, data will flow to both your Universal Analytics property and your Google Analytics 4 property.
Note that Shopify uses analytics.js (not gtag.js for it's existing universal analytics property), so you can confirm the final steps to upgrade by following this: https://support.google.com/analytics/answer/9310895#analyticsjs
None of the solutions recommended by "Shopify Partners" are adequate. Shopify needs to upgrade the integrated Google Analytics module. I know how to paste the tracking snippet into theme.liquid. That is wholly insufficient. And I'm not going to upgrade to Shopify Plus just so I can edit checkout.liquid. Shopify is an ecommerce platform. What good are analytics without ecommerce data? I don't care who comes to my website, I care who converts.
Agreed. I asked Support chat yesterday but they didn't seem to fully understand what I was talking about. I do hope that Shopify is not beginning to view their own Analytics as a viable alternative.
It's a shame that a Shopify rep hasn't commented on this thread to let us all know if/when/how GA4 will be supported.
Guess we just have to wait and hope that it comes eventually.
Knowing Shopify though, it'll be a while. Usually, they make an announcement months before the feature is available, and they haven't said a word yet (as far as I can tell).
I just had a support chat with Shopify about support in the store preferences for Google Analytics 4. The date is October 30, 2020. Although the rep was super kind, they basically said, "Right now we support Universal Analytics and I don't have any public information to share about Shopify's support for GA4." Then they kindly authenticated me and told me they would send my feedback and suggestion to their development team.
I did thank them BUT I also let them know that implementation of GA4 doesn't seem like something that the Shopify team should need feedback about. It should just be, "Hey guys, GA4 is coming out. I guess we have to adjust our code base to allow for this...like now." You're the leading e-commerce platform in the world. People build e-commerce stores using your technology, and those people need to be able to track analytics. Google Analytics is the worldwide standard tool for this.
Unfortunately, right now it seems like they are saying, "Yeah, we know GA4 came out and any new domains will be using it by default, but we're not sure if or when we'll support it." I'm sure they will eventually but just seems like a really big ball to drop on Shopify's part.
Hi everyone,
So the support person at Shopify that I worked with earlier today (10/30/20) reached back out to let me know that there is an option WHEN CREATING A PROPERTY to choose to create both a GA4 property AND a UA property. You have to make sure you click advanced in order to reveal this option while creating the property. At that point, it literally creates two properties for the website you entered in: one with the UA code and one with the new GA4 code, though they both have the same property name. At that point, you can still get the compatible UA-id that Shopify accepts.
Then, when Shopify implements an update for GA4, you can just update your code. At least this method allows you to still get google analytics started for any of your new shopify sites.
Thanks for clarity.
For additional clarity for those a little less familiar, and if needed, please correct me.
You are currently able to add the GA4 tracking code into your theme.liquid file, but since the checkout process is hosted with Shopify, (unless you are on Plus) the code will not fire on any checkout pages (making itself quite useless for e-commerce) until addressed by Shopify.
You can link an existing UA property to a new GA4 one. This allows for the continued data collection from your UA property setup but also allows you to start getting the limited data you can into GA4, better setting you up for success when/if Shopify addresses the update.
Hi there,
Glad there is a thread related with GA4.
I'm not sure if I missing something but I'll try to put context in order to be as clear as possible.
A) My shopify is not premium is the the basic one
The reason for this approach is that it seems that if I don't have the preamium account I'm not able to editing the checkout process so GTM will not be able to get fired. So the cookie will not be able to pass across different domains etc...
B) 1st attempt to upgrade to GA4:
2. I connected the tag from my UA and I implemented the custom dimensions that now are automatically converted to "paramethers" in this new data schema, but I'm not seeing any data.
I'm not sure what I'm missing, but because I'm not opened the store yet I will try to navigate through the store in order to send data to GA and see if it works.
If some of you guys see something incorrect don't hesitate in correct me.
Kind regards.
I'm confused. Didn't Shopify stop directing checkouts to their domain? I thought there's no domain switching anymore. I don't understand why you need Plus in order for the code to fire on checkout pages.
-oo
Perfect answer !
Thank you for your help
@andrew_ecomloop Thx for the instructions. If I already have Google Analytics (not GA4 version) installed, do I add the GA4 script in addition to my existing GA script, or does it have to replace existing script? I have current script installed via the Online Store / Preferences / Google Analytics. I want to make sure I don't lose tracking in the current GA property until I get more familiar w/ GA4. thx
Hi Andrew,
I have couple of questions:
1. Can shopify be integrated with GA4 through Google Tag Manager (I have installed google tag manager code to head of liquid).
2. So far there 2 options for GA4 given: installing global tag (which youhave mentioned and showed in your comment) or linking throught tag manager (GA4 configurations-all pages). I did it through tag manager with GA4 configurations and all pages. Checked preview and it all works. Checked on debugview and all works too. After I had entered realtime overview and saw my activity. The problem is that GA4 realtime overview does not get any life data at all (complete ZERO). While Google Analytics data worsk fine and I got instant updates.
3. I am also confused with google tag manager. I have installed the code to the head but there is also google analytics account UA-xxxxxx in the Preferences-google analytics-google analytics account (there is nothing in - additional google analytics javascript). My question should I keep the UA code in the google analytics account or should I delete it, since I have installed google tag manager code into the head in liquid. (I have google tag for google analytics too - universal analytics-all pages)
I would greatly appreciated your answer! Greetings
Dear Shopify community,
I am pleased to inform you that we have created a free tool & tutorial that shows how to set up Google Analytics 4 for your Shopify store without an app - including the e-commerce features.
The previous solutions on Youtube (and other tutorials) only about setting up the global tag and don't support the e-commerce setup and metrics. We have prepared a specific code to be added to your checkout page so that purchase metrics flows into Google Analytics 4 as the Ecommerce data. In the video, I am also showing how you can debug & verify our solution.
You can reach the beginner-friendly tutorial here > https://www.youtube.com/watch?v=K0kUtXVi0cE&ab_channel=Analyzify-PowerfulShopifyAnalytics
Kindly ping me on this thread if you have any questions or problems. Happy to help!
Hi @ekuplu,
Thanks for this awesome tutorial! It all makes sense. How would this process work for existing GA Universal analytics using GTM? Our site is set up that way, using this method. If I had to follow your flow here, I would have to first migrate the existing tag on GTM back to Shopify, and I am hesitant to do so. So I would appreciate it if you could give us a version of this process for GTM users.
Thanks! -oo
Thanks for your nice words and great question. That will actually require a little bit of code change and also some additions to your GTM account. This code block is prepared to send the data directly into GA4. Are you familiar with GTM? Could you do if I give you a direction?
If not, I can come back with another code block but I'm afraid it might take time.
I can try to follow your guidance in GTM – though, I'm definitely not an expert.
In the meantime, question; are there any pros/cons to using GTM over the method you explained. Again, I am happy to move our universal analytics code from GTM back to Shopify (and make sure it works first) before I go ahead and apply the GA4 process you've outlined in the video.
Thanks again! -oo
Actually doing through GTM is better because you can share the data with other parties as well. However, it is more complex to setup. I will try to help but I have to try that code blocks first. Could you be so kind as to leave a comment on the other thread so that I don't forget? We will be following that thread and improving the code blocks and knowledge base.
Dear @ekuplu
thank you very much for your tutorial which was extremely helpuful.
I was facing some problems with my Shopify eCommerce tracking on UA; I haven't been able to check conversions on UA any more since November 2020.
I thought that the problem could be caused by the new release of GA4. So I decided to create a new web property under GA4 and set up the gtag on my shopify store following your tutorial. I wanted to check if with GA4 I would have been able to see conversions again i my Google Analytics report.
I implemented both scripts you suggested, but I still have problems with eCommerce tracking. I see the website traffic real-time on my GA4, but if I test a purchase, I don't see any purchaser in the real time view.
Could you help me in understanding which is the problem?
Thank you in advance.
Best regards,
Beatrice
Hello, @BeatriceRossi
Really sorry for not seeing this earlier. Have you solved this problem? Could you follow the full tutorial and add all the related codes into your checkout scripts?
Shopify is always so fast to integrate with sales channels like Facebook, Instagram, Pinterest, and TikTok... why is Shopify so slow to create an easy way to implement the most used web analytics tool (Google Analytics) in its new version (GA4)? Google launched it in October 2020, now they even have an end-of-support date (July 2023). Normally we would like to compare YoY data, so we just have until July 2022 to have this setup working flawlessly!
Hi there,
Did you received any news about that?
kind regards
Following......
Following this thread.
Hi guys
From yesterday onwards I have started seeing Shopify pushing GA4 datalayer in some of the sites. Is anyone else seeing this?
Thanks
Nitesh
How did you install the tag?
I was just able to achieve the same result but I had to integrate some pretty funny dataLayer JS into the theme files... Were you able to do this another way?
@nesh007 What you screenshot is likely referring to Shopify's Google Shopping app given the AW ID the event is being sent to. What matters is the analytics setup first and foremost. analytics.js is still being loaded left, right, and center without gtag.js.
We naturally have an appeal to new things. The "rush" to get on GA4 is over-rated. The majority of stores even if they could get setup on Google Analytics 4 would not see a smidgen of improvement or better insight from the added capability of app tracking.
@Josh_Uebergang - You are right here. Shopify analytics expert Brad from www.getelevar.com pointed this to me last time. Google Ads has been using the GA4 object structure since early 2019. Google Advises GA4 to be tracked in parallel. I think the best we can have custom datalayer implemented.
Nitesh
This is an accepted solution.
@Josh_Uebergang what you say makes sense, but if analytics is using analytics.js and if we want adwords tracking on the site, that's using gtag.js, don't we have dual google implementations? and wouldn't that cause problems? see attached image
We saw our bounce rate cut in half (suspiciously) and some GA events stop flowing in, which always leads me to believe there's a GA implementation problem. We cannot backtrack it to any changes we made on our site (non-plus). The events that ARE able to flow in are on the checkout pages, so I'm wondering if gtag.js is blocking them from getting tracked on the rest of the site (since gtag.js is not in our checkout, it's not blocking the events there?)
These errors we're experiencing just happen to coincide with the prevalence of GA4 and google pushing us to update, so it's all part of my investigation.
Your problem is likely elsewhere rather than anything to do with blaming GA4.
Sudden drops in bounce rates are typically due to events firing that are treated as an interactionhit. See the dynamic remarketing section in my Google Shopping for Shopify book for an example of how to solve this. You need non_interaction to be set to true. It's a value that can be set to false for things like a video play where someone genuinely engages with the page, and hence, them leaving shouldn't be constituted a bounce.
Google Analytics 3 (Universal Analytics) will continue serving Shopify stores for years come. I remember the transition between 1-2 and 2-3. It's likely; most people will be using Google Analytics 3 for years to arrive until after Google enforces the adoption of new analytics features.
We're paying close attention to when Shopify upgrades to Google Analytics 4! However, there is no prominent call-to-action for Shopify upgrade if it's not being discontinued. This means it would put ecommerce stores at a disadvantage of not having access to Google Machine Learning to highlight critical trends inside your sales and marketing growth.
Hi everyone, has anyone tried this solution? https://www.getelevar.com/how-to/launch-google-analytics-4-shopify/
Hi there,
That solution could save you time, but I prefer to create my own "workaround". I guess that the main problem is related to what shopify service do you have.
1. If you have the basic plan: Then you could use GTM to configure both tags of GA4 (config and event) I guess that the session of the user will brake when checkout process.
2. You have premium one so you can modify custom code: Ideal one because then you can implement GA via GTM in all the pages (also checkout process).
I'm in the option one but in order to see data in a ga4 I've made a test and I saw the new features of GA4 in terms of new metrics, events etc...
kind regards!
Can someone from Shopify give detailed answer here?
The details of the issue are covered in this video overview. https://youtu.be/x2cPha1q75w
Hey guys,
I'm Radi from TAGinstall.
We do have a GA4 implementation in our app Easy Tag - GTM & Data Layer - https://apps.shopify.com/google-tag-manager-installer
Shoot me an email to support@taginstall.com if you need more details.
Cheers,
Radi
Hi @shamhen, I did what you said and it worked but it's not tracking any Ecommerce metrics. Can't figure out why as in GA everything in enable. Does it track them in your case?
For everyone using GA4, I'm trying to get a bug fixed with Shopify's implementation.
Could you go into GA4 > Reports > Life Cycle > Engagement > Events
Change "Rows per Page" to 250 and take a screenshot.
I'm interested in how many "begin_checkout" & "add_payment_info" event you're getting vs "purchase".
You'd assume there should be more begin_checkout & add_payment_info events than purchase events, since those events come before purchase, but I believe because of a bug, these events are not getting fired in GA4.
Here's my screenshot:
The GA4 CSP issue blocking begin_checkout and add_payment_info events seems to have been silently resolved by Shopify.
Latest update on this topic:
We have great news. We have created a free toolset that will allow you to set up GA4 on your Shopify store with ease - including the major e-commerce events.
The setup will be performed through Google Tag Manager(GTM). Don’t worry, you don’t need to know much about GTM because the tutorial covers it all. We’ve also prepared a pre-built GTM container. You just need to import it to GTM and change your GA4 measurement ID in it.
Here is the tutorial:
You can also follow the tutorial through the following page if you don't prefer a video.
You can let me know your comments through this thread.
As of March 2022, we decided to depreciate the GA4 Wizard. But hey, we’ve just created something even better for Shopify merchants!
Now, we are delivering a much improved, precise solution: Our team has prepared an open-source tool that allows Shopify merchants to set up GA4 through Google Tag Manager with no apps needed. We call it the Shopify GA4 Kit.
The Shopify GA4 Kit is a more sophisticated and complete solution including much more data. The best part? Well, you don't need to be an expert on this. It’s totally beginner-friendly, and we have created super-detailed, step-by-step tutorials to guide you along the way.
Hi @ekuplu ,
tell me if i'm wrong, but right now, there is no way (even with your super tutorial!), for a non Shopify Plus user, to embed the tracking code on the Checkout Page (or any code for what matters).
Meaning... the current session for the user will stop once he reaches the checkout page.
And a new session will be created once the users reach the order status page, or simply goes back to the website, with a Source/Medium at Direct/None.
So yes, we can trigger a purchase event thanks to the Settings > Checkout > Order Status Page > Additional Script, but it's safe to say the data will be completely skewed in GA4.
Pretty much every metrics around the session will be false, as well as the source/medium of a lot of sessions/events.
Am i missing something?
If not, Shopify really need to support GA4 natively. Google is strongly suggesting to start building data in GA4 now and not next July.
Hello, @Neitsabes!
Thanks for your nice words on the tutorial. Glad to hear it was helpful.
It is true that you will not have a chance to add GA4 or GTM tags on the checkout steps if you are not a Shopify Plus client. However, it will not cause a big issue.
The session will get interrupted, yes. But when the thank you page is loaded; the GTM & GA4 code will still be there and GA will read the cookie and relate the sessions. So traffic sources and similar reports will actually work fine. Of course, it will not be 100% accurate but it will still work great.
We take the exact same approach with Analyzify clients and they are quite happy with their Google Analytics reports. If you want to learn more about it; I'd recommend the following articles from our website:
I hope it was helpful.
Any updates on this? This has to be supported natively by Shopify, anything else is not a proper solution.
Just as an example of this: Adding the gtag.js code after the <head> in the theme.liquid reduces my pagespeed on all pages by 10+ points. This is simply not an acceptable implementation and must be possible to improve by properly implementing this natively.
Shopify needs to get on this asap.
GA4 will be the ONLY analytics next year. Has Shopify NOT done anything about this yet? I am still seeing that they don't support GA4.
I'm sure the Shopify team is working on the implementation. We don't exactly know when it'll be available. In the meantime, you can use our free solution: Shopify GA4 Kit, and have the most important events up and running without using an app or hiring an expert.
If you want to have a more comprehensive setup & more data flowing into GA4; you can consider using a paid app.
So i've just had a conversation with Shopify support & I'm dumfounded! Firstly I was told GA4 isnt supported & there are no timelines, when I asked how I get access to checkout.liquid so I can do this all myself, I cant without paying a load of money.... after expressing my amazement at this, I was told that a feature request will be submitted to the merchant team for the GA4 support.... I kind hope they're already on it!?
I dont want to lose and year on year data trends because shopify dont have their stuff together, has anyone been able to get anything setup?
We have prepared an open source & Do-It-Yourself solution and tutorial. You can check it out here: https://www.youtube.com/watch?v=hag6ucGxj5E.
With this setup, you can already start collecting data on your GA4 property. It also counts the purchases correctly.
(Sorry for the repeat on the topic; I've just received the notification and wanted to answer. I haven't realized my latest message is just above the question. I couldn't find a way to delete this message)
I was all about ready to reply with a sad face as I dont have access to checkout.liquid and i watched that part of your video.... i feel a bit stupid that I hadnt even realised that we can add custom scripts to the checkout! 🙂