{"id":546,"date":"2023-03-28T11:20:24","date_gmt":"2023-03-28T11:20:24","guid":{"rendered":"https:\/\/www.18thdigitech.com.au\/blog\/?p=546"},"modified":"2025-06-23T15:03:25","modified_gmt":"2025-06-23T05:03:25","slug":"steps-to-set-up-google-analytics-4-for-magento-2","status":"publish","type":"post","link":"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/","title":{"rendered":"Steps to Set Up Google Analytics 4 for Magento 2"},"content":{"rendered":"\n<p>Google stirred the eCommerce world in October 2020 when it announced that the Universal Analytics solution would cease to be functional from July 1, 2023. Hence, the stores that track customers and traffic using Universal Analytics will have to mandatorily migrate to Google Analytics 4.<\/p>\n\n\n\n<p>In this blog, we have discussed how to set up Google Analytics 4 for Magento 2.<\/p>\n\n\n\n<p>Before diving into the topic, let\u2019s discuss some<\/p>\n\n\n\n<h3><strong><u>Fun Facts on Google Analytics:<\/u><\/strong><\/h3>\n\n\n\n<ul><li>Currently, there are about 28.1 million websites that use Google Analytics, which is expected to rise in the upcoming years.<\/li><\/ul>\n\n\n\n<ul><li>Among all the popular analytics software development kits (SDKs), Google Analytics ranks third.<\/li><\/ul>\n\n\n\n<ul><li>Retail websites have around 6% of Google Analytics users, and the marketing industry is the leading user of Google Analytics with about 47, 128 customers.<\/li><\/ul>\n\n\n\n<ul><li>Approximately 5.8 million websites are currently using Google Analytics 4.<\/li><\/ul>\n\n\n\n<h2><strong><u>What is Google Analytics 4?<\/u><\/strong><\/h2>\n\n\n\n<p>Known to be among the most popularly used tracking tools on the market, Google Analytics allows users to collect data that will help make relevant business-related decisions. Primarily, Google Analytics tracks essential metrics related to website traffic and visitors like Page Views, Bounce Rates, Traffic Sources, Session Times, etc. Also, it facilitates real-time tracking of the number of visitors on the website at a given time, their geographical location, and what they are browsing.<\/p>\n\n\n\n<p>The recent and most advanced version of Google\u2019s free analytics tool is Google Analytics 4. The transition from the sessions to events is the major point of differentiation between Universal Analytics and Google Analytics 4 which facilitates collecting standardised data across all platforms. This helps get a single report along the entire user journey. At the same time, Google Analytics offers machine learning and Natural Language Processes (NLP). This makes it possible to estimate the possibility of conversion and use that information in Google Ads Campaigns. At the same time, glitches in reports including no conversion tracking or incorrect conversion coefficient calculations can be tracked using machine learning.<\/p>\n\n\n\n<p>Read More: <a href=\"https:\/\/www.18thdigitech.com.au\/blog\/the-beginners-guide-to-ga4-real-time-report\/\"><strong>The Beginners Guide to GA4 Real-time Report<\/strong><\/a><\/p>\n\n\n\n<h3><strong><u>How to Set Up Google Analytics 4 for Magento 2?<\/u><\/strong><\/h3>\n\n\n\n<p>Setting up Google Analytics 4 for Magento 2 can be quite challenging as not only are there quite a few steps involved but requires coding knowledge. Installing Magento 2 Google Analytics 4 module is the best solution, allowing quick integration of Google Analytics 4 with your Magento 2 store without proper technical knowledge.<\/p>\n\n\n\n<p>It supports several advanced features:<\/p>\n\n\n\n<ul><li>Real-time tracking of 5 default and popular events with eCommerce.<\/li><li>Doesn\u2019t require manual event creation.<\/li><li>Admin can identify a product through product ID\/SKU.<\/li><li>Brand-wise performance tracking is now easy.<\/li><li>The product variant feature can be enabled from the backend.<\/li><\/ul>\n\n\n\n<p>Are you planning on doing the integration on your own?<\/p>\n\n\n\n<p>If yes, then you need to have a Google Analytics account first. To create an account, go to <em>Analytics <\/em>under <em>Marketing Platform<\/em>, and click on <em>Get Started Today <\/em>to create an account. Once you have your account, you would have to tag your Magento store with Google Analytics 4.<\/p>\n\n\n\n<p>Let\u2019s get into the process step-by-step.<\/p>\n\n\n\n<p>1. <strong>Create a Google Analytics Property: <\/strong>To create a new Google Analytics property, log in to your Google Analytics dashboard. Go to <em>Account Settings <\/em>under the <em>settings<\/em> option and click on <em>Create Property <\/em>under the <em>Property Section<\/em>. Once the window opens, enter <em>Property Name, Reporting Time Zone, <\/em>and <em>Currency, <\/em>and click <em>Next. <\/em>You can add business-related data with Google to personalise your experience. However, it isn\u2019t a mandatory step. Lastly, click on the <em>Create <\/em>button.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-950x1024.png\" alt=\"Google Analytics Property\" class=\"wp-image-1331\" width=\"611\" height=\"658\" srcset=\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-950x1024.png 950w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-278x300.png 278w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-768x828.png 768w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-1425x1536.png 1425w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-1900x2048.png 1900w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-1200x1294.png 1200w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Google-analytics-property-1980x2134.png 1980w\" sizes=\"(max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<p><strong>Set Up Data Stream and Get the Measurement ID: <\/strong>Once you\u2019ve created the property, add a <em>Global Site Tag <\/em>followed by setting up a <em>Data Stream <\/em>(to get an idea of the data that is collected). From the <em>Choose a Platform<\/em>, choose <em>Web <\/em>since you are setting up Google Analytics 4 for your e-store which will open a window where you would need to set up your data stream and get your Measurement ID. Here, you would need to enter your <em>Website URL <\/em>and <em>Stream Name<\/em>. You\u2019ll come across some default tracking and insights under the <em>Enhanced Measurement Section. <\/em>Click on <em>Settings <\/em>to get more information about the captured events and disable the insights you do not require. Then, click on <em>Create <\/em>and the <em>Web Stream Details <\/em>window will open where your Measurement ID and tagging instructions to add the <em>Tracking ID<\/em> to your Magento store will be displayed. Go to the <em>Tagging Instructions <\/em>tab and expand the <em>Install Manually <\/em>section and copy the <em>Global Site Tag <\/em>script there.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"912\" height=\"546\" src=\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Data-Streams.png\" alt=\"Data Stream\" class=\"wp-image-1332\" srcset=\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Data-Streams.png 912w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Data-Streams-300x180.png 300w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Data-Streams-768x460.png 768w\" sizes=\"(max-width: 912px) 100vw, 912px\" \/><\/figure>\n\n\n\n<p><strong>Set Up the Global Site Tag in Magento 2: <\/strong>Once you have the Google Analytics 4 Global Site Tag, go to your Magento Admin section and add it to your site. To do so, log in to your Magento Admin and go to <em>Content <\/em>followed by <em>Design <\/em>and <em>Configuration. <\/em>Pick the store view as per your preference and add Google Analytics Global Site Tag and click on <em>Edit<\/em>. Enlarge the <em>HTML Head <\/em>section and paste the Google Analytics code in the <em>Scripts and Stylesheets<\/em> box and select <em>Save Configuration<\/em>. Go to <em>System <\/em>under the Magento Admin section then go to <em>Cache Management <\/em>under <em>Tools, <\/em>followed by clicking the <em>Flush Magento Cache <\/em>button. Reload your Magento 2 store frontend and the website would be tagged with a Google Analytics tracking code.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"544\" src=\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Set-UP-Ga4-Magento.png\" alt=\" Google Site Tag Setup\" class=\"wp-image-1334\" srcset=\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Set-UP-Ga4-Magento.png 1024w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Set-UP-Ga4-Magento-300x159.png 300w, https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/05\/Set-UP-Ga4-Magento-768x408.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Verify if the Store is Tagged Correctly: <\/strong>Among the different ways to verify if your store is tagged, we have listed the two simplest ways:<\/p>\n\n\n\n<ul><li><strong>By Inspecting the Source Code: <\/strong>Go to the front end of your website and click on <em>View Page Source <\/em>after right-clicking. You\u2019ll find the <em>Tracking ID<\/em> inside the tag that you inserted in the last step.<\/li><\/ul>\n\n\n\n<p><strong>Note<\/strong>: In case you don\u2019t see the Tracking ID, you haven\u2019t either cleared your store\u2019s cache or are using a CDN.<\/p>\n\n\n\n<ul><li><strong>By using the Tag Assistant Extension: <\/strong>Using the <em>Tag Assistant Browser <\/em>extension is another way to confirm if the Google Analytics 4 Tag is present. However, this Google extension isn\u2019t 100% safe. You would have to install the extension from the extension store in case you don\u2019t already have it. Once it is installed, click the extension and click on <em>Enable. <\/em>Next, reload the page and click on the extension again. Doing so, you would get to view the Global site tag in the Analysis section. Using the Tag Assistant extension, you can check information about your Google Tag including <em>Container ID, Account ID, <\/em>etc.<\/li><\/ul>\n\n\n\n<p><strong><u>Wrapping Up,<\/u><\/strong><\/p>\n\n\n\n<p>Now that you know why you should migrate to Google Analytics 4 immediately; you need to look for experienced and certified developers to help you migrate. Contact us at 18<sup>th<\/sup> DigiTech, an award-winning eCommerce Agency and an <a href=\"https:\/\/www.18thdigitech.com.au\/\">Adobe Gold Solution Partner<\/a>. Our team of developers, designers, and digital marketers is available 24\/7 to help you achieve every business goal you may have.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google stirred the eCommerce world in October 2020 when it announced that the Universal Analytics solution would cease to be functional from July 1, 2023. Hence, the stores that track customers and traffic using Universal Analytics will have to mandatorily migrate to Google Analytics 4. In this blog, we have discussed how to set up [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1208,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,29,27],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Setup GA4 with Magento 2 eCommerce \u2013 Australia Guide<\/title>\n<meta name=\"description\" content=\"Learn how to integrate Google Analytics 4 (GA4) with Magento 2 for accurate eCommerce tracking. Step-by-step setup guide for Australian businesses.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Setup GA4 with Magento 2 eCommerce \u2013 Australia Guide\" \/>\n<meta property=\"og:description\" content=\"Learn how to integrate Google Analytics 4 (GA4) with Magento 2 for accurate eCommerce tracking. Step-by-step setup guide for Australian businesses.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-28T11:20:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-23T05:03:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2023\/03\/Steps-to-set-up-google-analytics-4-.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"Tanuj Rastogi\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"4 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#organization\",\"name\":\"18th Digitech Australia\",\"url\":\"https:\/\/www.18thdigitech.com.au\/blog\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#logo\",\"inLanguage\":\"en-AU\",\"url\":\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2024\/02\/100x100.jpg\",\"width\":100,\"height\":100,\"caption\":\"18th Digitech Australia\"},\"image\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#website\",\"url\":\"https:\/\/www.18thdigitech.com.au\/blog\/\",\"name\":\"\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.18thdigitech.com.au\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-AU\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/#primaryimage\",\"inLanguage\":\"en-AU\",\"url\":\"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2023\/03\/Steps-to-set-up-google-analytics-4-.png\",\"width\":1200,\"height\":600,\"caption\":\"GA4 to Magento 2 Setup\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/#webpage\",\"url\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/\",\"name\":\"How to Setup GA4 with Magento 2 eCommerce \\u2013 Australia Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/#primaryimage\"},\"datePublished\":\"2023-03-28T11:20:24+00:00\",\"dateModified\":\"2025-06-23T05:03:25+00:00\",\"description\":\"Learn how to integrate Google Analytics 4 (GA4) with Magento 2 for accurate eCommerce tracking. Step-by-step setup guide for Australian businesses.\",\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#\/schema\/person\/ce4c66afecb3d3d74c2a08b9b6b8f512\"},\"headline\":\"Steps to Set Up Google Analytics 4 for Magento 2\",\"datePublished\":\"2023-03-28T11:20:24+00:00\",\"dateModified\":\"2025-06-23T05:03:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/steps-to-set-up-google-analytics-4-for-magento-2\/#primaryimage\"},\"articleSection\":\"eCommerce,GA4,Magento 2\",\"inLanguage\":\"en-AU\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#\/schema\/person\/ce4c66afecb3d3d74c2a08b9b6b8f512\",\"name\":\"Tanuj Rastogi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.18thdigitech.com.au\/blog\/#personlogo\",\"inLanguage\":\"en-AU\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/321f80121285bfb14cb30a62feff36d2?s=96&d=mm&r=g\",\"caption\":\"Tanuj Rastogi\"},\"description\":\"I have over 18 years of experience in the digital world, helping businesses thrive online by delivering profitable eCommerce solutions and innovative digital marketing strategies. With a strong understanding of eCommerce applications and digital marketing, I use these skills to help SMEs achieve success in the digital world. I firmly believe that every business deserves a competing chance online, regardless of their size or marketing budget.\",\"sameAs\":[\"https:\/\/18thdigitech.com.au\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","featured_image_src":"https:\/\/www.18thdigitech.com.au\/blog\/wp-content\/uploads\/2023\/03\/Steps-to-set-up-google-analytics-4--1024x512.png","_links":{"self":[{"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/posts\/546"}],"collection":[{"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/comments?post=546"}],"version-history":[{"count":6,"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/posts\/546\/revisions"}],"predecessor-version":[{"id":1610,"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/posts\/546\/revisions\/1610"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/media\/1208"}],"wp:attachment":[{"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/media?parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/categories?post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.18thdigitech.com.au\/blog\/wp-json\/wp\/v2\/tags?post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}