Google Analytics 4 Full integration?

fdrcti
Tourist
8 0 1

 

Hi everyone,

I've just heard about GA4 and it sounds  really good.

I've just created a new property, following the link https://support.google.com/analytics/answer/9744165  but i do not manga to understand how I implement it in my Shopify  store.
I've already read different posts about this topic, suggesting to add in the liquid code the snippet but id does not work properly. Is there anyone able to find a definitive and completely working solution?
I think it's a must have and Shopify should seriously evaluate to update its integration to manage the new tag.

Thanks.

0 Likes
fdrcti
Tourist
8 0 1

No One able to help?

0 Likes

We hope this guide will work for you.

Step1: Get the GA4 Global Tag

As you have the account now, it is time to get the new global tag and insert it into your Shopify store.
Find your new GA account in your Google Analytics, and then > Click Admin > Data Streams > Click the Tag > And then find Global Tag and copy the full code

SEOBooster_0-1618282524499.gif

 

Step 2: Insert the tag into Shopify's main theme file

The global tag should be on every page. You should insert that into the Shopify theme's main file: theme. liquid - right below

.
Shopify Admin > (left bar) Online Store > Themes > Actions (near your active theme) > Edit Code --- And then find theme.liquid. It should look like this >

SEOBooster_1-1618282524492.png

 

Step 3: Get your checkout tag from Analyzify GA4 Wizard

Everything was standard until now. Now we have come to the existing part. Our team has prepared a special code block to be inserted and rendered in your Checkout/thank you page. It includes Shopify's shortcode for order confirmation details such as order ID, revenue, etc - and also GA4's Purchase Event tag including your measurement ID.
Go to our free tool > Analyzify GA4 Wizard for Shopify, fill the simple form, and get your code. It should look like this >

SEOBooster_2-1618282524494.jpeg

 

Copy the code and move to the next step.

Step 4: Paste the code into Shopify's Checkout screen

As this is an e-commerce purchase code, it should be rendered when someone makes a purchase. Shopify allows us to add additional scripts into "Order Processing" and "Thank you" pages. Go to Shopify Admin > Settings > General > Checkout and then find Order Processing > Additional Scripts - and paste it there.

Step 5: Verify

All good! It should be working perfectly now if you followed the steps properly. You can wait for some purchases to happen in your online store so that you can check if data flows into your new GA4 account. 

I hope you find it useful and feel free to let us know if you have any questions or face any issues.

(Source: https://dev.to/analyzify/how-to-setup-google-analytics-4-on-shopify-without-an-app-1e3n )

SEO Booster - The best Shopify SEO App
- Was our reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
Thank you!!!
0 Likes
Danielexx85
Explorer
94 0 13

hi there,

I am following this conversation as I am having the same problem. I switched to GA4 but after 2 days data are not flowing yet. I have installed GA4 through the tag manager but apparently it is not enough. 

Should I copy the gtag.js in the theme.liquid even if I set it already through the google tag manager? 

thanks

 

 

www.caglio.co.uk
Propelguru
Trailblazer
310 7 39

Google Analytics GA4 is the new default option for Google Analytics. The  Google analytics community has been waiting for this release for a long time. However, as with any new product, it has some internal and external problems.

GA4 uses a different approach to data collection compared to Universal Analytics (UA), the previous version. The main function of UA was the display of pages and events added to that. We intend to use event tracking for specific actions like form submission, registrations, video engagement, button clicks, etc. In  Google Analytics GA4, even a page view is an event! It may not sound like a rebellious change, but it actually is. 

Steps that will guide you set up Google Analytics GA4 on Shopify:

Step 1: Obtain the global GA4 tag

Step 2: Insert the tag into the main Shopify theme file

Step 3: get your payment tag from the Analyzify GA4 wizard

Step 4: paste the code on the Shopify checkout screen

Step 5: Verify - Make Sure!

0 Likes
Don
Shopify Staff
Shopify Staff
1290 79 169

Hi there @fdrcti!

Don here from Shopify.

Thanks for reaching out for more information here on our Community forums.

I spent some time checking in with my colleagues from our tech team, to see if we could provide any more info on the Google Analytics 4 integration you mentioned.

My colleagues were able to confirm that Shopify does not yet support this update, but does continue to support Universal Analytics (UA) properties (format “UA-”), which can still be generated via Google Analytics.

Would you have previously created this kind of property to use with Google Analytics?

We don't have any updates to share on when this functionality might be updated in the future currently but I'd keep an eye on our updates blog here so you can stay informed on any such changes to the platform in the future. 

There are third-party app solutions that you can use that work with GA4, though you would need to confirm with the app developers exactly what functionality they can support.

All the best!

 

Regards,

Don

Don | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog