{"id":3005,"date":"2022-04-11T16:26:53","date_gmt":"2022-04-11T15:26:53","guid":{"rendered":"https:\/\/www.suisseo.ch\/en\/?p=3005"},"modified":"2022-05-30T16:29:23","modified_gmt":"2022-05-30T15:29:23","slug":"how-to-install-google-analytics-4","status":"publish","type":"post","link":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/","title":{"rendered":"How to install Google Analytics 4 (GA4)?"},"content":{"rendered":"

As you probably know (if not, we recommend reading our latest article on the end of Universal Analytics), Google has announced that it will be deprecating Universal Analytics starting 1 July 2023. This means that your Universal Analytics properties will completely stop receiving data (hits) starting in early July 2023.<\/p>\n

Google Analytics 4, or \u201cGA4\u201d, will replace its predecessor originally released in 2013.<\/p>\n

If you have a Universal Analytics property and you don’t know how to set up GA4, you are in the right place! Read on.<\/p>\n

In this guide? Discover how to add a Google Analytics 4 property<\/h2>\n

1. Create a Google Analytics 4 property<\/h3>\n

Log in to your Google Analytics account and access your Google Analytics account administration settings. Under \u201cProperty Settings\u201d, look for the “Upgrade to GA4” link.<\/p>\n

If you do not yet have a Google Analytics account, you must first create one for free by visiting the official Google Analytics page<\/a>.<\/p>\n

If the upgrade option is not available to you, you can click on the \u201cGA4 Setup Assistant\u201d section or click on \u201cCreate Property\u201d to create a new GA4 property.<\/p>\n

\"Upgrade<\/a><\/p>\n

Click the \u201cGet Started\u201d button to begin the setup process with the Google Analytics setup assistant. You will then have several options depending on your current GA configuration.<\/span><\/p>\n

\"Selecting<\/a><\/p>\n

If you are using the Global Site Tag to implement GA, the assistant will be able to enable data collection with your existing tags.<\/p>\n

If you are not using the Global Site Tag, the following steps will show you how to enable data collection using Google Tag Manager (GTM).<\/p>\n

Before you can start collecting data, you need to generate a measurement ID for your new GA4 property. The measurement ID is similar to the Universal Analytics ID. Enter the \u201cTag installation\u201d menu. See the green box below.<\/p>\n

\"Selecting<\/a><\/p>\n

GA4 does not have views like Universal Analytics. Instead, it features data streams. The data stream automatically measures certain events such as scrolls, outbound link clicks, site searches, file downloads, etc. Expand the drop-down list to add a stream and select the item you want to track.<\/p>\n

In this example, we are tracking a website, so we’ll select Web.<\/p>\n

\"Adding<\/a><\/p>\n

Configure your data stream by entering your website URL and stream name.<\/span><\/p>\n

Click on \u201cCreate Stream\u201d when you are finished.<\/span><\/p>\n

\"Configuring<\/a><\/p>\n

Now that you have your measurement ID, copy it as it is needed to configure the GA4 configuration tag in Google Tag Manager.<\/p>\n

\"Now<\/a><\/p>\n

If you use a particular CMS such as WordPress, Magento, Drupal, etc. and your current version of Google Analytics was installed without going through the Global Site Tag or using Google Tag Manager (GTM) but thanks to a particular plugin, please refer to the documentation provided by the tool in question.<\/p>\n

 <\/p>\n

2. Add the tracking code to your website<\/h3>\n

Connect your free tag management tool Google Tag Manager and click on \u201cAdd new tag\u201d.<\/p>\n

\"Adding<\/a><\/p>\n

Select \u201cTag configuration\u201d and choose \u201cGoogle Analytics: GA4 Configuration\u201d as tag type.<\/span><\/p>\n

\"Tag<\/a><\/p>\n

Fill in the Measurement ID that is in your new property and that you previously copied and paste this ID into the Measurement ID field as shown in the image below.<\/p>\n

Advice:<\/strong> We recommend that you create a constant variable for the measurement ID instead of entering it manually. This will allow you to reference the measurement ID for other tags and avoid inconsistencies in the future.<\/p>\n

\"Added<\/a><\/p>\n

Now that your tag is defined, you need to configure your trigger so that the code is triggered on all pages and click on \u201cSave\u201d to complete the configuration of GA4.<\/p>\n

\"Choice<\/a><\/p>\n

You can now test your GA4 tag with the preview mode of your Google Tag Manager by clicking on the \u201cPreview\u201d button.\u00a0<\/span><\/p>\n

 <\/p>\n

\"Google<\/a><\/p>\n

Enter the URL of your site in the field provided.<\/span><\/p>\n

\"URL<\/a><\/p>\n

You can publish your container to put the new tag online. Remember to publish your container after testing, otherwise your GA4 property will not receive data.<\/p>\n

\"Button<\/a><\/p>\n

\"Google<\/a><\/p>\n

 <\/p>\n

3.Enable data collection in Google Analytics<\/h3>\n

Return to Google Analytics to enable confirmation of user data collection. Access the administration settings of your Google Analytics account. Under \u201cData settings\u201d go to the \u201cData collection\u201d section then accept the \u201cconfirmation of user data collection\u201d.<\/p>\n

\"Google<\/a><\/p>\n

 <\/p>\n

4. Verify that the GA4 property is collecting data<\/h3>\n

Once you add the Analytics tag to your website, Google Analytics starts sending data to your property very quickly (usually after 10-15 minutes).<\/p>\n

To verify that your property is receiving data, check the \u201cReal time\u201d report. If you have configured your measurement code correctly, the Real-time Users card should refresh every 15 seconds or so (showing a new number of users).<\/p>\n

\"Real-time<\/a><\/p>\n

 <\/p>\n

It takes 24-48 hours for Analytics to process data from other reports.<\/p>\n

Conclusion<\/h2>\n

Now that you have completed the base configuration of GA4, you can start using it to more effectively track users and their actions. Note that events and conversions are not automatically migrated from your UA account to GA4. In order to find all your conversions and events, and therefore continue to follow your main KPIs, you will need to configure them via GTM. The same goes for e-commerce measurements.<\/p>\n

Do not hesitate to contact us for any request, whether at the strategic or operational level. Our web tracking specialists will be happy to support you at every stage of your project.<\/p>\n","protected":false},"excerpt":{"rendered":"

Install Google Analytics 4: discover our 4-step guide to installing Google Analytics on your website. <\/p>\n","protected":false},"author":17,"featured_media":3022,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[9,7],"tags":[],"acf":[],"yoast_head":"\nHow to install Google Analytics 4?<\/title>\n<meta name=\"description\" content=\"Easily set up a new Google Analytics 4 property. Follow our 4-step guide\" \/>\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.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install Google Analytics 4?\" \/>\n<meta property=\"og:description\" content=\"Easily set up a new Google Analytics 4 property. Follow our 4-step guide\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/\" \/>\n<meta property=\"og:site_name\" content=\"Suisseo (EN)\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Suisseo\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-11T15:26:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-30T15:29:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1043\" \/>\n\t<meta property=\"og:image:height\" content=\"543\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"matteo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@suisseo\" \/>\n<meta name=\"twitter:site\" content=\"@suisseo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"matteo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/\",\"url\":\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/\",\"name\":\"How to install Google Analytics 4?\",\"isPartOf\":{\"@id\":\"https:\/\/www.suisseo.ch\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg\",\"datePublished\":\"2022-04-11T15:26:53+00:00\",\"dateModified\":\"2022-05-30T15:29:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.suisseo.ch\/en\/#\/schema\/person\/1c8a53625b72b97b96abbeb68aeb8096\"},\"description\":\"Easily set up a new Google Analytics 4 property. Follow our 4-step guide\",\"breadcrumb\":{\"@id\":\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#primaryimage\",\"url\":\"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg\",\"contentUrl\":\"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg\",\"width\":1043,\"height\":543},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.suisseo.ch\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install Google Analytics 4 (GA4)?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.suisseo.ch\/en\/#website\",\"url\":\"https:\/\/www.suisseo.ch\/en\/\",\"name\":\"Suisseo (EN)\",\"description\":\"Search & Web Marketing\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.suisseo.ch\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.suisseo.ch\/en\/#\/schema\/person\/1c8a53625b72b97b96abbeb68aeb8096\",\"name\":\"matteo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.suisseo.ch\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e5fe2c3e4fca7df564180a6e69a861d6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e5fe2c3e4fca7df564180a6e69a861d6?s=96&d=mm&r=g\",\"caption\":\"matteo\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/matteo-maggini-42a255a7\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install Google Analytics 4?","description":"Easily set up a new Google Analytics 4 property. Follow our 4-step guide","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/","og_locale":"en_US","og_type":"article","og_title":"How to install Google Analytics 4?","og_description":"Easily set up a new Google Analytics 4 property. Follow our 4-step guide","og_url":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/","og_site_name":"Suisseo (EN)","article_publisher":"https:\/\/www.facebook.com\/Suisseo","article_published_time":"2022-04-11T15:26:53+00:00","article_modified_time":"2022-05-30T15:29:23+00:00","og_image":[{"width":1043,"height":543,"url":"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg","type":"image\/jpeg"}],"author":"matteo","twitter_card":"summary_large_image","twitter_creator":"@suisseo","twitter_site":"@suisseo","twitter_misc":{"Written by":"matteo","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/","url":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/","name":"How to install Google Analytics 4?","isPartOf":{"@id":"https:\/\/www.suisseo.ch\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#primaryimage"},"image":{"@id":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#primaryimage"},"thumbnailUrl":"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg","datePublished":"2022-04-11T15:26:53+00:00","dateModified":"2022-05-30T15:29:23+00:00","author":{"@id":"https:\/\/www.suisseo.ch\/en\/#\/schema\/person\/1c8a53625b72b97b96abbeb68aeb8096"},"description":"Easily set up a new Google Analytics 4 property. Follow our 4-step guide","breadcrumb":{"@id":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#primaryimage","url":"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg","contentUrl":"https:\/\/www.suisseo.ch\/en\/wp-content\/uploads\/sites\/3\/2022\/05\/GA4.jpg","width":1043,"height":543},{"@type":"BreadcrumbList","@id":"https:\/\/www.suisseo.ch\/en\/blog\/analytics\/how-to-install-google-analytics-4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.suisseo.ch\/en\/"},{"@type":"ListItem","position":2,"name":"How to install Google Analytics 4 (GA4)?"}]},{"@type":"WebSite","@id":"https:\/\/www.suisseo.ch\/en\/#website","url":"https:\/\/www.suisseo.ch\/en\/","name":"Suisseo (EN)","description":"Search & Web Marketing","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.suisseo.ch\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.suisseo.ch\/en\/#\/schema\/person\/1c8a53625b72b97b96abbeb68aeb8096","name":"matteo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.suisseo.ch\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e5fe2c3e4fca7df564180a6e69a861d6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e5fe2c3e4fca7df564180a6e69a861d6?s=96&d=mm&r=g","caption":"matteo"},"sameAs":["https:\/\/www.linkedin.com\/in\/matteo-maggini-42a255a7\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/posts\/3005"}],"collection":[{"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/comments?post=3005"}],"version-history":[{"count":0,"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/posts\/3005\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/media\/3022"}],"wp:attachment":[{"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/media?parent=3005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/categories?post=3005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suisseo.ch\/en\/wp-json\/wp\/v2\/tags?post=3005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}