{"id":1759,"date":"2025-07-25T14:23:27","date_gmt":"2025-07-25T11:23:27","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?p=1759"},"modified":"2025-07-28T14:23:31","modified_gmt":"2025-07-28T11:23:31","slug":"add-google-analytics-4-wordpress","status":"publish","type":"post","link":"https:\/\/creativethemes.com\/blocksy\/blog\/add-google-analytics-4-wordpress\/","title":{"rendered":"How to Add Google Analytics 4 to WordPress (And What Is GA4 Anyway?)"},"content":{"rendered":"\n<p>Google Analytics 4 (GA4) is Google\u2019s next-generation analytics platform, designed for modern cross-platform tracking. Here&#8217;s how to add it to your WordPress site &#8211; and why it&#8217;s worth it.<\/p>\n\n\n\n<p>In this guide, we will tell you what Google Analytics 4 is and how it is different from the previous edition of Google Analytics &#8211; called Universal Analytics. Then, we&#8217;re going to show you how to enable it on your WordPress website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"key-takeaways\">Key Takeaways:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Google Analytics 4 uses an event-based model<\/strong>, unlike Universal Analytics, which was pageview-based. This allows more flexible and detailed tracking.<\/li>\n\n\n\n<li><strong>GA4 supports cross-platform tracking<\/strong>\u00a0for both websites and mobile apps under one property, making it ideal for multi-channel businesses.<\/li>\n\n\n\n<li><strong>You can run GA4 alongside Universal Analytics<\/strong>, so there&#8217;s no need to switch completely right away.<\/li>\n\n\n\n<li><strong>Setting up GA4 is simple with the GA4 Setup Assistant<\/strong>, which lets you add a new GA4 property with just a few clicks.<\/li>\n\n\n\n<li><strong>GA4 can be added to WordPress manually, via a plugin, or through a theme like Blocksy<\/strong>, depending on your setup and comfort level.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#key-takeaways\">Key Takeaways:<\/a><\/li><li><a href=\"#google-analytics-4-what-is-it-\ud83d\udcaa\">Google Analytics 4 &#8211; What Is It \ud83d\udcaa<\/a><ul><li><a href=\"#will-i-lose-my-current-google-analytics-panel-after-i-switch\">&#8220;Will I Lose My Current Google Analytics Panel After I Switch?&#8221;<\/a><\/li><\/ul><\/li><li><a href=\"#what-are-the-benefits-of-using-ga-4\">What Are the Benefits of Using GA4?<\/a><\/li><li><a href=\"#how-to-get-started-with-google-analytics-4-\ud83e\udd14\">How to Get Started With Google Analytics 4 \ud83e\udd14<\/a><ul><li><a href=\"#1-sign-up-to-google-analytics\">1. Sign up to Google Analytics<\/a><\/li><li><a href=\"#2-create-a-ua-property\">2. Create a UA Property<\/a><\/li><li><a href=\"#add-GA4\">3. Add a Google Analytics 4 Property<\/a><\/li><li><a href=\"#4-how-to-embed-your-ga-4-code-in-word-press\">4. How to Embed Your GA4 Code in WordPress<\/a><\/li><\/ul><\/li><li><a href=\"#faq-google-analytics-4-and-word-press\">FAQ \u2013 How to Add Google Analytics to WordPress<\/a><ul><li><a href=\"#what-is-google-analytics-4-ga-4\">What Is Google Analytics 4 (GA4)?<\/a><\/li><li><a href=\"#can-i-use-ga-4-and-universal-analytics-at-the-same-time\">Can I Use GA4 and Universal Analytics at the Same Time?<\/a><\/li><li><a href=\"#how-do-i-get-my-ga-4-tracking-code\">How Do I Get My GA4 Tracking Code?<\/a><\/li><li><a href=\"#whats-the-easiest-way-to-add-ga-4-to-word-press\">What\u2019s the Easiest Way to Add GA4 to WordPress?<\/a><\/li><li><a href=\"#why-should-i-switch-to-ga-4\">Why Should I Switch to GA4?<\/a><\/li><\/ul><\/li><li><a href=\"#thats-it-\ud83c\udf7e\">That&#8217;s It! \ud83c\udf7e<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"google-analytics-4-what-is-it-\ud83d\udcaa\">Google Analytics 4 &#8211; What Is It \ud83d\udcaa<\/h2>\n\n\n\n<p>Google Analytics seems like a product that worked perfectly well and was probably complicated enough already, right? Who needs a new version?! \ud83e\udd37\u200d\u2642\ufe0f<\/p>\n\n\n\n<p>The long story short is that v4 is Google&#8217;s answer to the ever-increasing popularity of mobile and the need for a more flexible way of collecting data.<\/p>\n\n\n\n<p>The way things used to work with Universal Analytics (UA) all happened around <em>pageviews<\/em>. GA4, on the other hand, is based on <em>events<\/em>. Moreover, with this new version of Google Analytics, you can track not only a <em>website<\/em> but also an <em>app<\/em> that you might have alongside your website.<\/p>\n\n\n\n<p>Apart from that, Google Analytics 4 also has its own new spin on reports and report looks. Among them: a new home report, real-time report, games reporting, monetization reports, and more.<\/p>\n\n\n\n<p>Overall, Google Analytics 4 is the next step for analytics &#8211; a more modern and optimized solution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"will-i-lose-my-current-google-analytics-panel-after-i-switch\">&#8220;Will I Lose My Current Google Analytics Panel After I Switch?&#8221;<\/h3>\n\n\n\n<p>The good news is that you don&#8217;t have to lose any sleep over it at this point. In this early stage of Google Analytics 4&#8217;s adoption, you can run both Universal Analytics and Google Analytics 4 simultaneously.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-the-benefits-of-using-ga-4\">What Are the Benefits of Using GA4?<\/h2>\n\n\n\n<p>Google Analytics 4 (GA4) represents a significant upgrade from Universal Analytics (UA) for several reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cross-platform tracking<\/strong>: now you can track users from your website and mobile app. This can be vital for businesses that are promoting their mobile apps. In Universal Analytics such tracking was complicated.<\/li>\n\n\n\n<li><strong>Event-based tracking<\/strong>: GA4 is built around events, not pageviews. You can now track a wide variety of user actions more accurately and efficiently.<\/li>\n\n\n\n<li><strong>GDPR-compliance<\/strong>: GA4 can be crucial in some cases where GDPR and CCPA compliance is needed.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Universal Analytics (UA)<\/th><th>Google Analytics 4 (GA4)<\/th><\/tr><\/thead><tbody><tr><td>Data Model<\/td><td>Pageviews-based<\/td><td>Event-based<\/td><\/tr><tr><td>Cross-Platform Tracking<\/td><td>Web tracking primarily<\/td><td>Web and app tracking unified under one property<\/td><\/tr><tr><td>Reports<\/td><td>Predefined reports<\/td><td>Customizable, more flexible reports<\/td><\/tr><tr><td>AI\/ML Insights<\/td><td>Limited use of AI\/ML<\/td><td>Built-in AI\/ML-driven insights and predictive metrics<\/td><\/tr><tr><td>Privacy &amp; Cookies<\/td><td>Relies on cookies for data collection<\/td><td>Designed with privacy in mind; can work with limited cookies<\/td><\/tr><tr><td>User Tracking<\/td><td>Session-based, with limited user-level tracking<\/td><td>Event-based with improved user-centric tracking<\/td><\/tr><tr><td>Custom Dimensions\/ Metrics<\/td><td>Restricted number of custom dimensions\/metrics<\/td><td>More flexibility with unlimited event parameters<\/td><\/tr><tr><td>Real-time Reporting<\/td><td>Basic real-time reporting<\/td><td>Enhanced real-time reporting with better data visualization<\/td><\/tr><tr><td>Conversions<\/td><td>Goal-based (session-oriented)<\/td><td>Event-based conversion tracking<\/td><\/tr><tr><td>Cross-domain Tracking<\/td><td>Manual setup<\/td><td>Automatic with better user-ID tracking across domains<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">The key differences between Universal Analytics (UA) and Google Analytics 4 (GA4)<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-get-started-with-google-analytics-4-\ud83e\udd14\">How to Get Started With Google Analytics 4 \ud83e\udd14<\/h2>\n\n\n\n<p>Here&#8217;s the kicker, the recommended way of setting your site up with Google Analytics 4 is to run it <em>alongside<\/em> UA and not <em>instead<\/em> of it. You can test it with some custom pages like landings dedicated to special events or occasions for users. Learn <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/upload-html-wordpress\/\">how to upload HTML files to WordPress<\/a> and create such landings.<\/p>\n\n\n\n<p>Just to emphasize this again, in the recommended setup, you&#8217;re going to be running both UA and GA4 at the same time &#8211; at least for now. As GA4 matures, we might see UA go away, but that&#8217;s not where we&#8217;re at yet.<\/p>\n\n\n\n<p>Here&#8217;s how to set up Google Analytics 4 and then integrate it with your WordPress website:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-sign-up-to-google-analytics\">1. Sign up to Google Analytics<\/h3>\n\n\n\n<p>\ud83d\udca1 <em>Note; If you already have an account with Google Analytics and your website hooked up to it, you can <a href=\"#add-GA4\">skip to step #3<\/a>.<\/em><\/p>\n\n\n\n<p>The first step is to create a new Google Analytics account and create a standard &#8211; UA &#8211; property for your website.<\/p>\n\n\n\n<p>To begin, go to <a href=\"https:\/\/analytics.google.com\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">analytics.google.com<\/a> and log in to your Google account (the one you use for Gmail).<\/p>\n\n\n\n<p>You&#8217;ll see the main welcome screen:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1688\" height=\"1093\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-welcome.png\" alt=\"Google Analytics welcome\" class=\"wp-image-1768\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-welcome.png 1688w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-welcome-300x194.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-welcome-1024x663.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-welcome-768x497.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-welcome-1536x995.png 1536w\" sizes=\"auto, (max-width: 1688px) 100vw, 1688px\" \/><\/figure>\n\n\n\n<p>Google Analytics will invite you to get started. The account creation process isn&#8217;t too complicated, but you&#8217;ll need to go through a couple of forms.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"1276\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-setup-1.png\" alt=\"Google Analytics setup\" class=\"wp-image-1767\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-setup-1.png 1680w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-setup-1-300x228.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-setup-1-1024x778.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-setup-1-768x583.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-setup-1-1536x1167.png 1536w\" sizes=\"auto, (max-width: 1680px) 100vw, 1680px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-create-a-ua-property\">2. Create a UA Property<\/h3>\n\n\n\n<p>After getting the account set up, it&#8217;s time to add a &#8220;property.&#8221; A property is Google Analytics&#8217; fancy term for the website that you want to track.<\/p>\n\n\n\n<p>From the admin panel of Google Analytics, click on <em>+ Create Property<\/em> to begin.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1691\" height=\"546\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-create-property.png\" alt=\"Create a property in Google Analytics\" class=\"wp-image-1763\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-create-property.png 1691w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-create-property-300x97.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-create-property-1024x331.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-create-property-768x248.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-create-property-1536x496.png 1536w\" sizes=\"auto, (max-width: 1691px) 100vw, 1691px\" \/><\/figure>\n\n\n\n<p>Again, at this stage, Google Analytics will ask you for some necessary details about your site. The important part is to click on the <em>Show advanced options<\/em> button and then enable UA by switching this toggle button:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1375\" height=\"1100\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-property-form.png\" alt=\"Google Analytics property form\" class=\"wp-image-1764\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-property-form.png 1375w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-property-form-300x240.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-property-form-1024x819.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-property-form-768x614.png 768w\" sizes=\"auto, (max-width: 1375px) 100vw, 1375px\" \/><\/figure>\n\n\n\n<p>Once you have all the required info filled in, click on <em>Create<\/em>.<\/p>\n\n\n\n<p>After a couple of seconds, you should see a confirmation screen. This is where you&#8217;re going to get your unique tracking ID and the tracking code snippet that you can use to integrate your site with Google Analytics later. Lear about <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/how-to-add-rich-snippets-to-wordpress\/\">rich snippets<\/a> in our guide.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"622\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-ua-setup-done.png\" alt=\"Google Analytics Universal Analytics setup done\" class=\"wp-image-1766\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-ua-setup-done.png 1190w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-ua-setup-done-300x157.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-ua-setup-done-1024x535.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-ua-setup-done-768x401.png 768w\" sizes=\"auto, (max-width: 1190px) 100vw, 1190px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Need help on how to get through the basic setup with Google Analytics? Read <a href=\"https:\/\/support.google.com\/analytics\/answer\/10269537\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">this official doc<\/a>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"add-GA4\">3. Add a Google Analytics 4 Property<\/h3>\n\n\n\n<p>With your UA property alive and well, let&#8217;s now add a GA4 property alongside.<\/p>\n\n\n\n<p>Luckily, Google Analytics makes this really easy with the official <strong>GA4 Setup Assistant<\/strong>. To access it, go to the Admin section of your current property &#8211; find the link in the bottom left corner of the GA interface:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"376\" height=\"373\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-admin.png\" alt=\"Google Analytics admin link\" class=\"wp-image-1762\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-admin.png 376w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-admin-300x298.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga-admin-150x150.png 150w\" sizes=\"auto, (max-width: 376px) 100vw, 376px\" \/><\/figure>\n\n\n\n<p>In the <em>Property<\/em> column, there&#8217;s a link labeled <em>GA4 Setup Assistant<\/em>. Click on it to begin.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1107\" height=\"468\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant.png\" alt=\"GA4 Setup Assistant\" class=\"wp-image-1772\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant.png 1107w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-300x127.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-1024x433.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-768x325.png 768w\" sizes=\"auto, (max-width: 1107px) 100vw, 1107px\" \/><\/figure>\n\n\n\n<p>The on-screen wizard will get you through the steps needed. It&#8217;s all very clear.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1582\" height=\"936\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-2.png\" alt=\"GA4 Setup Assistant process\" class=\"wp-image-1771\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-2.png 1582w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-2-300x177.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-2-1024x606.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-2-768x454.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/GA4-setup-assistant-2-1536x909.png 1536w\" sizes=\"auto, (max-width: 1582px) 100vw, 1582px\" \/><\/figure>\n\n\n\n<p>Click on <em>Get Started<\/em> to create a new property. This whole process consists of just a single step. You&#8217;re literally one click away from having your new Google Analytics 4 property up and running.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1575\" height=\"923\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-property-ready.png\" alt=\"Google Analytics 4 property up and running\" class=\"wp-image-1769\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-property-ready.png 1575w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-property-ready-300x176.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-property-ready-1024x600.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-property-ready-768x450.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-property-ready-1536x900.png 1536w\" sizes=\"auto, (max-width: 1575px) 100vw, 1575px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Need help with the GA4 Setup Assistant? Read this <a href=\"https:\/\/support.google.com\/analytics\/answer\/10312255\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">official doc<\/a>.<\/li>\n<\/ul>\n\n\n\n<p>From this screen, click on the button labeled <em>See your GA4 property<\/em>. This will land you on an intro screen where you&#8217;ll be able to get your global site tag &#8211; a piece of code used to integrate your site with Google Analytics.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1573\" height=\"1026\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-welcome.png\" alt=\"Google Analytics 4 welcome\" class=\"wp-image-1774\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-welcome.png 1573w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-welcome-300x196.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-welcome-1024x668.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-welcome-768x501.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-welcome-1536x1002.png 1536w\" sizes=\"auto, (max-width: 1573px) 100vw, 1573px\" \/><\/figure>\n\n\n\n<p>Click on <em>Tag installation<\/em> to begin.<\/p>\n\n\n\n<p>Your main web data stream should be there on the list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1477\" height=\"1128\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-web-stream.png\" alt=\"Google Analytics 4 web stream\" class=\"wp-image-1775\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-web-stream.png 1477w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-web-stream-300x229.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-web-stream-1024x782.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-web-stream-768x587.png 768w\" sizes=\"auto, (max-width: 1477px) 100vw, 1477px\" \/><\/figure>\n\n\n\n<p>This page holds all the info you need to integrate your WordPress site with Google Analytics 4. The most important piece of data is your <em>measurement ID<\/em>.<\/p>\n\n\n\n<p>To get your GA4 embed code, expand the section labeled <em>Global Site Tag (gtag.js)<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1197\" height=\"410\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-global-tag.png\" alt=\"Google Analytics 4 global tag\" class=\"wp-image-1770\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-global-tag.png 1197w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-global-tag-300x103.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-global-tag-1024x351.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/ga4-global-tag-768x263.png 768w\" sizes=\"auto, (max-width: 1197px) 100vw, 1197px\" \/><\/figure>\n\n\n\n<p>You can copy and paste it someplace handy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-how-to-embed-your-ga-4-code-in-word-press\">4. How to Embed Your GA4 Code in WordPress<\/h3>\n\n\n\n<p>There are two ways you can do this:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>manually<\/strong><\/li>\n\n\n\n<li><strong>with the help of your theme<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Let&#8217;s start with the latter.<\/p>\n\n\n\n<p>First, check if your theme came with any Google Analytics integration out the box. If it did, using it will be the easiest way to add Google Analytics 4 to your WordPress site.<\/p>\n\n\n\n<p>For example, in <a href=\"https:\/\/creativethemes.com\/blocksy\/\">Blocksy<\/a>, you can add your Google Analytics 4 code (and UA code) when you go to the WordPress Customizer and then into <em>Visitor Engagement \u2192 General<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"427\" height=\"910\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/blocksy-engagement.png\" alt=\"Blocksy engagement\" class=\"wp-image-1761\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/blocksy-engagement.png 427w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/blocksy-engagement-141x300.png 141w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><\/figure>\n\n\n\n<p>From there, you can add both your standard UA ID and your new GA4 ID.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"423\" height=\"523\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/blocksy-add-ga.png\" alt=\"Blocksy add Google Analytics 4\" class=\"wp-image-1760\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/blocksy-add-ga.png 423w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/02\/blocksy-add-ga-243x300.png 243w\" sizes=\"auto, (max-width: 423px) 100vw, 423px\" \/><\/figure>\n\n\n\n<p>This is literally all you have to do to enable GA4 in Blocksy. Just publish the changes in Customizer, and you&#8217;re done!<\/p>\n\n\n\n<p>In other themes, you might find these settings in different places.<\/p>\n\n\n\n<p>\u26a0\ufe0f Important; some WordPress themes won&#8217;t allow you to enable Google Analytics 4 through their existing integrations with Google Analytics. For instance, it&#8217;s common for themes to require a <code>UA-<\/code> ID to integrate with your Google Analytics. The new v4 ID starts with <code>G-<\/code> and this by itself might be enough to prevent the theme from allowing it (not to mention the lack of code structures to handle it under the hood).<\/p>\n\n\n\n<p>If your theme doesn&#8217;t come with a built-in integration, you can either:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>use a Google Analytics plugin (just go to the official <a href=\"https:\/\/wordpress.org\/plugins\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">plugin directory<\/a> and put &#8220;Google Analytics&#8221; into the search box, there&#8217;s plenty of those things), or<\/li>\n\n\n\n<li>include the code manually in the source files of your theme &#8211; usually in the <code>footer.php<\/code> file or through a hook in <code>functions.php<\/code> (the plugin route is more straightforward, honestly).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq-google-analytics-4-and-word-press\">FAQ \u2013 How to Add Google Analytics to WordPress<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-is-google-analytics-4-ga-4\">What Is Google Analytics 4 (GA4)?<\/h3>\n\n\n\n<p>GA4 Is the Newest Version of Google Analytics, Using an Event-Based Tracking Model That Provides Deeper Insights and Works Across Websites and Apps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-use-ga-4-and-universal-analytics-at-the-same-time\">Can I Use GA4 and Universal Analytics at the Same Time?<\/h3>\n\n\n\n<p>Yes, You Can Run Both Together. This Dual Setup Is Recommended During the Transition to GA4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-do-i-get-my-ga-4-tracking-code\">How Do I Get My GA4 Tracking Code?<\/h3>\n\n\n\n<p>After Creating a GA4 Property, Go to Tag Installation, Select Your Web Stream, and Find Your Global Site Tag (gtag.js) and Measurement ID.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"whats-the-easiest-way-to-add-ga-4-to-word-press\">What\u2019s the Easiest Way to Add GA4 to WordPress?<\/h3>\n\n\n\n<p>Use Your Theme Settings (If Supported), a Plugin, or Manually Paste the Tracking Code Into Your Theme\u2019s Footer or Functions File.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-should-i-switch-to-ga-4\">Why Should I Switch to GA4?<\/h3>\n\n\n\n<p>GA4 Offers Flexible Event Tracking, Better Real-Time Data, Cross-Platform Support, and Improved Privacy Features Over Universal Analytics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"thats-it-\ud83c\udf7e\">That&#8217;s It! \ud83c\udf7e<\/h2>\n\n\n\n<p>You now have GA4 up and running. Go to the new Google Analytics dashboard and check out what&#8217;s going on. The real-time views panel is fascinating &#8211; something that the previous versions of Google Analytics were not that good at. Remember, you can always use a <a href=\"https:\/\/microanalytics.io\/\" target=\"_blank\" rel=\"noopener\">Google Analytics alternative<\/a>.<\/p>\n\n\n\n<p>Sidebars can be a great CTA solution to track via analytics. Read our <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/wordpress-custom-sidebars\/\">guide to WordPress custom sidebars<\/a> next.<\/p>\n\n\n\n<p><strong>Want an easier way to implement GA4? Blocksy Pro includes built-in analytics support and other performance-focused features.<\/strong><\/p>\n\n\n\n<p>Another tool from Google is Google Ads with the help of which you can <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/place-ads-wordpress-site\/\">monetize your site by placing ads in WordPress<\/a>. If you want to boost Facebook traffic with ads, read <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/add-facebook-pixel-wordpress\/\">how to add Facebook Pixel to WordPress<\/a> guide.<\/p>\n\n\n\n<p>If you have any questions about how to use Google Analytics 4 with WordPress, let us know in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Analytics 4 (GA4) is Google\u2019s next-generation analytics platform, designed for modern cross-platform tracking. Here&#8217;s how to add it to your WordPress site &#8211; and why it&#8217;s worth it. In this guide, we will tell you what Google Analytics 4 is and how it is different from the previous edition of Google Analytics &#8211; called [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1836,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1759","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts\/1759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=1759"}],"version-history":[{"count":18,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts\/1759\/revisions"}],"predecessor-version":[{"id":13792,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts\/1759\/revisions\/13792"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media\/1836"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=1759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/categories?post=1759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/tags?post=1759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}