--> Transform Your Web Strategy: Effortlessly Set Up Google Analytics 4 | Strategic Leap

Transform Your Web Strategy: Effortlessly Set Up Google Analytics 4

SHARE:

 To analyze user activity on your website, the data must first be collected and processed correctly. In this post, you’ll learn how to set u...

 To analyze user activity on your website, the data must first be collected and processed correctly. In this post, you’ll learn how to set up Google Analytics correctly and configure it in the best possible way.

Setting up Google Analytics is often described as a 5-minute action: “Click here, confirm there, and the first data will come in.” However, whether everything is being collected correctly out of the box is not certain, you may not immediately use all the features to your advantage. As your offers grow and become more sophisticated, you should know exactly which screws to turn.

Setting up a completely new Google Analytics account does not happen very often, especially in companies. Usually, you’ll take over an already existing account, and new websites or apps are rarely added. But was everything taken into account and implemented in the best possible way? Do the decisions made back then still apply today? You should also understand what works and what doesn’t for a check your setup and check for updates.

Set Up Google Analytics 4
Set Up Google Analytics 4

Creating an Account, a Property, and a Data Stream

A Google Analytics account is a basic requirement for all other settings, and you’ll need a Google account to create a Google Analytics account. When you navigate to https://analytics.google.com/, Google will either take you to the login page where you can register or, if required, set up an account free of charge. If your Google account is not linked to any Google Analytics account, you’ll be taken to the setup home page.

Your Google account can have access to multiple Google Analytics accounts, and you can create additional accounts at any time. If you’re already in a running Google Analytics report after logging in, you should go to the administration settings (Admin) by clicking the cogwheel icon in the menu on the left. In this area, you can set up an additional account above the first column. Assign a name to the new account.

In total, your Google account can have access to 100 Google Analytics accounts at the same time regardless of whether you’ve created the accounts yourself or have been granted access. When you create a new account, the current number is displayed. Multiple accounts can access one Google Analytics account.

If a text section with the heading Link to organization appears below the input field, your currently selected account is linked to an organization, and you can apply this setting, as shown in below figure. An organization is an administrative unit that is below an account and with which you can assign some settings for Google Analytics and other Google products. 

Linking Account to an Organization
Linking Account to an Organization

The account name is followed by its data sharing settings, with the following four options available:

Google products and services

If you activate this setting, your data will be used to improve Google Analytics. The data flows into both Analytics Intelligence and spam detection capabilities, both of which benefit from a large amount of data. However, the setting is not related to the special exchange of your data with other products such as Google Ads. These settings are configured separately and independently. By default, this option is switched off and can remain so.

Benchmarking

With this setting, your (aggregated) data is transferred to a large comparison pool. By sharing your data for benchmarking, you will get access to all other data yourself and can compare key figures from your websites with those of other offers from the same industry. Benchmarking data is not yet available for google analytics 4, and it is so general in Universal Analytics (UA) that you can do without it. You should therefore deactivate this option.

Technical support

By checking this box, you give Google service employees permission to log into your account. If you have a support request, the Google staff member can access your property this way.

Account manager

This setting is also about access to your account by Google employees, but this time by sales and marketing experts. They can make recommendations and suggestions for optimization based on your data. You can deselect this checkbox, and for support, you can activate this setting at any time if required.

In summary, you can deactivate all these options without noticing any noticeable restrictions in your account. For a future data privacy audit, sharing as little data as possible is ideal.

Creating a Property

A property is your repository for the tracking data that you collect on your website. You can run user activities from one or more websites and one or more apps in a property. When you set up a new account, a new property is automatically created for you; you should check some details and adjust if necessary. You can change all these settings later if you change your mind.

First, you must assign a name under which you want to find the property in the Google Analytics menu later. Then, you must maintain the Reporting time zone and Currency fields, as shown below.

Defining the Basic Data for a Property
Defining the Basic Data for a Property

The time zone determines the time at which user access is logged. For reports in Google Analytics, this time zone counts as the basis, not the time zone of the respective visitor. If you have selected Eastern Standard Time as the time zone, access from users from New Zealand will be shown with the corresponding time difference. A view made at 12 noon in Auckland on a Tuesday is recorded as Monday 7 p.m. EST.

The currency is your default setting for e-commerce and campaign cost data. If you use several currencies in your store, when tracking orders, you can optionally specify them in the code and thus overwrite the default setting.

You can create additional properties under Admin. A total of 2,000 properties are possible per account. For this task, click on the Create property button above the column in the administration settings. If the button is grayed out, your Google account does not have the necessary permissions in this account, and you’ll need to contact an administrator (or create a new account first).

Once you’ve set up a property, you’ll be asked for some more information about your company. This information on industry and size is voluntary and is used by Google to improve its offering. They do not have a direct influence on your GA4 reports. You can therefore skip this step by clicking Create.

Then, you must confirm the terms of use.

Example: Creating a Data Stream for the Web

By creating an account and a property, you have created a framework for collecting data. In the next step, you’ll need at least one data stream to tell GA4 where the data is coming from.

On the next screen, as shown in below figure, you can choose between three platforms: Web, Android app, and iOS app. For a website, first create a web data stream.

GA4 Collects Data from Various Platforms
GA4 Collects Data from Various Platforms

Enter the URL of the website you want to track and enter a name for this stream. You can leave the optimized analyses activated. After confirming your selections by clicking Create stream, you’ll be taken to the detail view of the web stream. The most important information on this screen for the next step is the measurement ID, which is a unique identifier for how this stream is addressed in tracking codes.

A property can contain multiple data streams, both for web and app data. You can return to this overview of data streams at any time via the administration settings and add more streams there. Each stream has its own measurement ID and may differ in some settings. The user data collected from all streams is totaled in the report, but you can segment it by stream.

Theoretically, you can set up to 20 streams in one property. However, Google recommends creating as few streams as possible. Multiple streams are particularly detrimental to performance when generating an entire report. If, for example, you want to analyze multiple websites in a property together, you must set up a stream and install the tracking code with the same measurement ID on all websites.

Structuring Google Analytics Accounts and GA4 Properties

You’ve now learned the steps for creating an account, creating a property, and creating a data stream for a single offer. An account can contain multiple properties and these in turn can contain multiple data streams. A user can have access to multiple accounts with their Google Analytics login.

But how do you use these units if you have multiple websites or apps to analyze? To make planning easier for you, let’s explore some examples of common tasks next.

Individual Website

The setup we’ve described so far consists of a single coherent website or domain. All the content you want to measure is available at www.my-website.com, for example.

In this case, you can use a property with a data stream.

Multiple Websites

You want to track the path of users via different websites, as these websites are related in terms of content, for example, the path from www.my-website.com to store.my-website.com. GA4 must collect the data in a property so that you can see where users accessed the www site from and then purchased in the store.

If you have multiple top-level domains, for example, www.my-website.de and www.my-website.com, you must ask yourself whether user paths overlap between the websites. In this case, an analysis in a property makes sense.

You can only use one data stream for multiple subdomains as well as for top-level domains in a property. With separate data streams, Google Analytics treats the users in each stream separately and cannot display a coherent value.

You should consider adding different domains together in a property in the following cases:

  • If the content of the websites is identical, for example, in the case of different language versions of the same website. If the URLs on these websites are identical, you can analyze all content together with the overall account.
  • If the websites have the same content and only differ in their presentation, for example, if they are optimized for desktop PCs or mobile devices.
  • If the websites are closely interlinked in terms of content, as with a website and a blog. Users move back and forth between the two types of content, and there is no clear boundary.
  • If the websites are advertised on one page, but users can reach their set destination elsewhere. For instance, you have a website and a store. You advertise the website in a campaign with the aim of getting more visitors to buy from the store.

Basically, you can assume the following: The more similar your websites are, the more likely they should be counted in a common property.

Measuring Multiple Websites Separately

If you view the data of multiple domains independently of each other, two separate properties are probably easier to handle. Thus, you won’t have to constantly filter data to one domain or another later on. This scenario arises, for example, with different language versions of the same website: If each language version is managed by a different employee, everyone has their own reports.

Apps and Websites in Combination

For apps, you need one data stream per system. For example, if you have created an app for Android and iOS, you should create one property with two data streams for the analysis. If you also have a website that either shares content with the apps or extends them, you must create a data stream for it in the same property.

Reports Only for Subdirectories

Your website might have various subdirectories, such as /de/ and /en/, but perhaps, you only want to provide your co-workers with data for “their” respective directory. In this case, you can create a separate property plus a data stream and only include the count in this subdirectory. If your colleagues only need to see what content has been accessed in their directory, this option makes sense.

However, you should bear in mind that all data outside these directories will then be lost. For example, if a user accesses the start page (/) and then clicks on the /en/ directory, all data collected on the start page will be lost. Such a division is therefore unfavorable for the consideration of sources and campaigns. In this case, you should use a comprehensive property that you can filter and segment.

Only Selected Data for Users

Let’s say you only want to give colleagues or a service provider access to selected data, for example, only for users who have come through a campaign. Unfortunately, the GA4 interface does not provide any restrictions for different users or user groups. All users with access to a property can see the data and reports it contains. For example, you cannot give a user access to only a few pages in the report.

Two restrictions on data are possible via the administration settings: You can explicitly prevent the display of revenue data and/or campaign costs for users.

Managing User Rights at a Higher Level

If you manage reports for entirely independent websites for example, as an agency for various client projects you must use a separate account for each project. Then, you can grant admin rights for an individual account. You can also hand over such an account pretty easily, after a project is finished.

If you need to manage access to multiple Google Analytics accounts that belong together organizationally (such as the country sites of an international corporation), you should consider using a Google Marketing Platform (GMP) organization. This approach provides an administration level for users and groups across multiple accounts.

Embedding Tags on Websites

After setting up a data stream, you’re now ready to start collecting user data. At this point, you must now integrate the Google tag into your website so that views are registered in your property. The Google tag is a JavaScript code that collects and sends user data to the Google Analytics servers, as shown in below figure.

Page Tagging Process in Google Analytics
Page Tagging Process in Google Analytics

To start collecting data for your website, GA4 provides several options in the data stream:

  1. Via the administration of your content management system (CMS) or store system; alternatively, through a plugin
  2. By integrating JavaScript code directly into HTML
  3. Via configuration in Google Tag Manager
  4. Through a link to an existing UA property

Each variant has its advantages and disadvantages, which we’ll briefly cover next.

Using a Website Builder, Content Management System, or Store System

In the web data stream details, the last item is View tag instructions. This item contains the installation instructions for integrating the Google tag. GA4 lists instructions for a whole range of systems to guide you through the setup. Simply copy the tag ID from the installation instructions and enter this value in the relevant configuration for the plugin, CMS, or store.

Today, many offerings use WordPress as a website builder. With the Site Kit, Google offers its own WordPress plugin for the quick and easy integration of Google Analytics and other Google services.

If your system is not on this list, looking for third-party plugins might be worthwhile. These plugins can extend a system with functions for code execution and configuration. For example, solutions from other manufacturers can display Google tags and data in WordPress.

With store systems, native integration or a plugin usually has an advantage in that the information for e-commerce tracking is displayed correctly, in addition to the Google tag.

An overview of which systems already support GA4 tags out of the box and which will require you to enter code directly can be found at https://support.google.com/analytics/answer/10447272.

Google Tag Directly in the Source Code

If your system is not on the list mentioned earlier, you can insert the Google tag manually into one of the templates or page templates. The Google tag (gtag) allows the integration of various Google tracking codes, as shown in Listing below. The gtag is the basis for the integration of Google Analytics, but it can also request codes for Google Ads and Google Display & Video 360 (DV360).

[<!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/ 

gtag/js?id=G-Z5729XXXXX"></script>

<script>  

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

 

  gtag('config', 'G-Z572914KR7');  

</script>]

In the web data stream, you’ll find the JavaScript code to copy and paste into your website in the installation instructions, under the Install manually tab, which is where the correct measurement ID is automatically stored. This element in the code is decisive because it determines which property the views are sent to. For Google Analytics data streams, the ID always starts with a G-, differing from Google Ads conversion tags, for example, which begin with AW.

The direct integration of the tracking code promises optimal loading times and is relatively easy to implement if you have access to the backend or access to the files for your website. However, if you want to extend individual tracking, for example, for different clicks or for e-commerce, you’ll need in-depth programming skills in JavaScript.

When integrating gtag codes directly, an important step is to link them correctly to the consent query before the page is loaded for the first time. The consent manager and the Google tag must be configured accordingly, which is implemented differently depending on the combination.

GA4 in Google Tag Manager

Google Tag Manager is Google’s toolbox for all tasks related to tracking codes. This solution can configure tags, read and collect additional data from websites, and display the right tags at the right times.

For a larger setup with multiple tracking systems and many user actions that you want to measure, Google Tag Manager is an indispensable companion. Positioned between the website and the Google Analytics server, Google Tag Manager makes the development of your tracking codes independent of your website’s sprints and release cycles, as shown in below figure.

Tracking Using Google Tag Manager
Tracking Using Google Tag Manager

As a Google product, Google Tag Manager comes with the necessary templates for easy integration with Google Analytics. Simply note the measurement ID of the data stream during setup.

If you already have a running Google Tag Manager container, go to Google Tag Manager to create a new tag. In the list that appears, select the Google Tag. (Even if you click on the Analytics item, you’ll be taken to the Google Tag.)

In the settings window, enter the measurement ID in the corresponding field. At this stage, you can ignore the other options.

Now, the tag needs a trigger. Select the Initialization - All Pages trigger from the list. Finally, you must publish the container by clicking the Send button.

The first Google tag ensures that the relevant pages of your website are tracked. In addition, it serves as a configuration template for individual GA4 event tags.

In a Google tag for individual event calls, select a GA4 configuration tag, from which the measurement ID for the event call is taken. As a result, you don’t need to constantly enter the measurement ID of your data stream.

Google Tag Manager is a powerful tool that supports many systems and codes. A more detailed introduction is available in the Google Tag Manager help at https://support.google.com/tagmanager/answer/14842872?hl=en.

Consent Mode for User Consent

The Google tag must not record user activities on a website or app without explicit permission. A number of data privacy requirements must be considered when tracking. To obtain the consent of your users for tracking, you’ll need a corresponding query that is presented to users when they first access your website.

You can then transfer the user’s selection to the Google tag or have the consent manager transfer it. The Google tag behaves differently depending on the consent (or refusal) given. The Google tag may only record user actions and data with the user’s consent.

The tag provides the consent mode for the transmission of these values. As described in Table 2.1, this mode comes in two variants, which we’ll cover next.

Comparison of Consent Modes
Comparison of Consent Modes

Simple Consent Mode

When a page is viewed, the Google tag is loaded but does not yet send any data. The data won’t be sent until the Google tag receives the necessary consent signals. If a user refuses to have their activities tracked, the Google tag remains inactive, and the user will not be measured.

Extended Consent Mode

When a page is viewed, the Google tag waits again for the user to interact with the query. If consent is given, all actions are counted, and the user is permanently marked with a cookie. However, if consent is refused, no cookies are set, but user data is still sent in a trimmed-down version. Google refers to these views as pings. If a sufficient number of pings occurs, Google attempts to model and extrapolate user behaviors from those pings.

In both modes, Google Analytics assumes that the user has not yet made a selection or given consent when the page is viewed. This behavior can be adjusted in the Google tag settings.

Google does not offer a separate banner or widget for displaying and obtaining consent. Instead, a whole host of solutions, both comprehensive consent manager services and (in some cases, free) plugins for various systems. A list of systems that directly support consent mode and provide data can be found at https://support.google.com/tagmanager/answer/14546213.

Checking Whether Data Is Arriving

In the installation instructions, you’ll find a field for checking the integration at various points in the tabs. If you enter a URL, Google Analytics will check whether the Google tag is installed. However, this test only works if you have integrated the Google tag directly. If you use Google Tag Manager, the test will fail.

We therefore recommend reviewing the Realtime overview report. Once you’ve integrated the Google tag of the newly created GA4 property, the first user activities should be visible in the report.

You can access this report via the GA4 menu. If you have integrated the Google tag into an existing website on which users are already browsing, the first entries should appear immediately, as shown in figure below.

Incoming Data in the Realtime Overview
Incoming Data in the Realtime Overview

However, if a completely new offer or a test environment, you must provide the initial data yourself. For this task, open the website from which you expect traffic in your browser.

An important step is that you now confirm the consent query, which is likely to appear. Only then will your visit be released for tracking and thus appear in the real-time view.

However, if your real-time report remains empty, start troubleshooting with the data call that the Google tag sends on the page.

For this step, go to your website and open the developer tools in the browser of your choice. In Chrome, for example, press Ctrl + I. Go to the Network area. You’ll probably see a long list of entries. If not, reload the page.

In this window, you’ll see all files loaded by the browser when the page was viewed, as shown in figure below, including texts, images, fonts, and more. 

All Website Calls in the Developer Tools
All Website Calls in the Developer Tools

Now, use the filter field above the list to search for the collect?v=2 string, as shown in below figure.

String to Filter GA4 Calls Only
String to Filter GA4 Calls Only

This step will show you all requests your browser has sent for tracking with GA4. If you do see requests, at least the data transfer has worked. Activities should then also be visible in the real-time report. If “real time” remains empty despite dispatch, investigate two possible causes:

  • The data was sent to the wrong property. Check the measurement ID in the tracking code of the page.
  • Your access is filtered. Is there already a filter for IP addresses in your property?

However, if you do not find any collect calls in the list of network calls, you either have an issue with the code itself, or your browser does not want to send it. You should therefore check the following next:

Is the browser the problem?

Have you perhaps installed an adblocker or a privacy plugin in your browser? You should also check your consent to tracking in your consent box. It is best to use a different browser or at least a different profile in your browser. This also avoids problems caused by caching the page in the browser’s cache.

Is the Google tag being adopted correctly?

If you have copied and pasted the Google tag code shown at the end of the data stream setup, check the source code of the browser to see if the code is fully included in the page. To do this, go to your website and open the source code. In Chrome, for example, press Ctrl + U. Search for “gtag” and compare the code block again with the block from the property management. The block should start with a comment:

<!-- Global site tag (gtag.js) - Google Analytics -->

The block should end with a script tag:

</script>

If, for example, you have forgotten the closing script tag, the code will not execute.

Has the tag been published in Google Tag Manager?

Changes in Google Tag Manager must first be published before they can be deployed to users. If you integrate the new tag via Google Tag Manager, check whether you have published the new version at the end.

Events in GA4

In GA4, events are the basic unit for all tracking. Almost every measured action or unit can be traced back to an event. GA4 processes certain special events for certain reports; these events often have fixed parameters. The Google tag automatically fires a whole series of events in GA4 without your intervention when certain actions take place. However, you can also create individual new events, which we’ll cover next.

Structure and Use of Events

A GA4 event always consists of at least one event name and optional parameters. Certain names are linked to reports in GA4. For example, page_view events have the page_location and page_referrer parameters whose data is included in the page report and the source report. All data is entered in the Events report under the Engagement menu item.

In GA4, events are divided into four types:

  1. Automatically recorded events
  2. Events for optimized analyses
  3. Recommended events
  4. Custom events

We’ll take a closer look at these types in the following sections.

Automatically Recorded Events

As soon as the Google tag is installed on a website, it starts collecting user data. You don’t need to do anything else or configure anything, simply load the tag. However, these events are not sent from the website; instead, they are generated within the GA4 property based on the data. Thus, you won’t see these events under the Network tab of your browser.

The session_start, first_visit, and user_engagement events are automatically generated on websites, as shown in Table below.

Automatically Generated Events in GA4
Automatically Generated Events in GA4

These three events are also generated for apps that you can track using the Firebase software development kit (SDK). Some special events are only generated for apps.

Events for Optimized Analyses

In addition to the automatically recorded events, the Google tag can track other actions on your website independently. You can switch this tracking on or off in the data stream settings, as shown in below figure. Unfortunately, Google came up with the somewhat unwieldy name of optimized analyses instead of calling these “automatic events” too.

Optimized Analyses During the Data Stream Setup
Optimized Analyses During the Data Stream Setup

You can activate optimized analyses for various tasks. The Google tag executes out the necessary code and fires the corresponding events without any further adjustments to your website’s code. This capability works both for the integration via gtag code and for integration via Google Tag Manager. You can also switch optimized analyses on or off at any time in the administration of the data stream.

In contrast to automatically recorded events, you can see optimized analyses under the Network tab of your browser, and you can track what data is being sent.

GA4 provides seven automatically tracked events with optimized analyses, which we’ll now look at in detail.

Page Views

When a page is loaded and the associated Google tag is loaded along with it, a page view is triggered. A page view also happens whenever a user reloads a page by clicking on the refresh button in their browser. In the event report in GA4, the action appears as page_view.

Page views are the only optimized analysis that cannot be deactivated. They only allow the behavior to be adapted for dynamic websites, as shown in Figure 2.19. For example, changes in the browser history (history change) are also logged by default. These changes often occur on dynamic and code-heavy websites that use JavaScript to load content without leaving the actual page. You can sometimes recognize them in the browser by a hash # in the URL.

Capturing Page Changes for Dynamic Websites
Capturing Page Changes for Dynamic Websites

You can deactivate this behavior under Advanced settings, although this step is only necessary in very special cases. Usually, you can ignore this option and leave the settings as is.

As mentioned earlier, you cannot deactivate automatic page loading so make sure that you only load the Google tag after the user has given their consent.

Scrolling Processes

If a page is too long for a user’s browser window, the user must scroll down. With this optimized analysis, the Google tag records the moment when a user has seen 90% of a page (or when it was technically visible in the browser). In this case, the scroll event is triggered, and the value 90 is passed as a parameter.

Clicks on External Links

An external link is a link that leads to another domain (i.e., to a domain that is different from the one currently called in the browser). When you click this link, not only is the click event fired, but a number of parameters are also transferred, which you can analyze later in GA4, such as the following parameters:

  • The clicked URL
  • The domain to which the change is made
  • The CSS class of the clicked link
  • The HTML ID of the clicked link
  • Information on whether the domain is stored for cross-domain tracking

Domains you have stored for cross-domain tracking are not regarded as external domains and are therefore not counted per event.

Website Search

If you provide a search function on your website that users can use to browse your website’s contents, you can configure an analysis of the search queries entered in that search field.

For this task, first check whether the search of your offer transfers the search query with a URL parameter. You can check this capability by starting a search on the website and then viewing the URL in the browser. For example, when searching on Google, the query is passed in the q parameter:

https://www.google.com/search?q=mysearchquery

The website search is already preconfigured for the following parameters:

q, s, search, query, keyword

If your input appears in the URL as a value after another parameter, you should add this parameter in the field provided.

If additional data is transferred in your search, such as a category filter, you can enter this value in the input field for additional search parameters and later analysis.

If a user views a page that contains one of the stored parameters in the URL, the Google tag fires the view_search_results event and passes the input and additional fields as parameters for later evaluation.

Interaction with a Form

If forms are built into the website, GA4 attempts to record the interaction and submission. For this purpose, the form_start and form_submit events are triggered.

The following parameters are transferred:

  • The HTML ID of the form
  • The HTML name of the form
  • The destination URL of the form
  • A test of the send button, if available

The recognition of the form dispatch does not necessarily work as intended in all cases. 

Engagement with Videos

If videos are integrated on your website, the user’s actions with the player will be recorded. However, one prerequisite is that the player element use of the JavaScript application programming interface (API). For example, if you embed the YouTube player, you must activate the API with a parameter. (For more information, review the YouTube documentation under the “enablejsapi” keyword.)

If the communication between the player and the Google tag works, events are fired at the start (video_start); at the end (video_complete); and when 10%, 25%, 50%, and 75% (video_progress) of the video has been reached.

For these events, additional information is transferred as parameters for the video, such as the following:

  • The title of the video
  • The URL of the video
  • The host of the video (e.g., YouTube)
  • The total duration of the video
  • The current playing time of the video
  • The percentage progress in the video

File Downloads

The Google tag recognizes a click on a link to a specific file type as a download. These file types can be documents, compressed archives, videos, or audio files. Specifically, the following extensions are recognized as downloads:

  • PDF files: .pdf
  • Office files: .docx, .xlsx, and .pptx
  • Text files: .txt, .rtf, and .csv
  • Packed archives: .7z, .rar, .gz, .zip, and .pkg
  • Videos: .mp4, .mpg, .avi, .mov, and .wmv
  • Audio files: .mp3, .wav, and .wma
If the extension is recognized, the Google tag fires the file_download event along with additional information. The following information about the click event is transferred as parameters:

  • File name
  • File extension
  • Text of the link
  • URL of the link
  • Domain of the link
  • CSS class of the link
  • HTML ID of the link

Recommended Events

In addition to the events of the optimized analyses, you might want to record many other user actions on your website. But not all actions can be logged automatically the technical implementations are simply too diverse and too different.

GA4 has created recommended event names for such frequently occurring actions whose tracking you have to program yourself (or integrate via plugin), as shown in Table below. For example, a completed purchase should be transmitted with the event name purchase; a registration for a service or newsletter, with sign_up.
Selection of Recommended Event Names with Parameters
Selection of Recommended Event Names with Parameters

If GA4 receives event names with the specified designation, this tracking data is sorted into specific reports. The parameters of a purchase call flow into the e-commerce reports, for example. Recommended names are available especially for promotions in stores and game apps.

Separate reports are not yet available for all recommended events. Nevertheless, following these recommendations with a view to future developments makes sense. If additional reports or report templates are added to GA4 in an update, you’ll have already collected the data in the correct format.

Custom Events

Some user actions can be recorded automatically by GA4. Any additional actions on the website must be entered by yourself. You should use the recommended event names as much as possible, but you can also assign your own names and parameters.

How you track individual events within a page depends on how you integrate the Google tag:

If you have integrated the code via the gtag script, you can fire an event using a JavaScript command.

If you use Google Tag Manager to display the GA4 configuration on a website, you’ll want to create GA4 events in the container.

Events with gtag

The JavaScript command to fire a GA4 event within a page is structured, as shown below.

[gtag('event', '<event_name>', {
  <event_params>
});]
For a real call, of course, you must replace the two fields in brackets:

<event_name>: The event will appear under this name in the report.

<event_params>: Parameters that you transfer as a name-value pair. The transfer of parameters is optional; you can also just trigger an event with a name.

An example of a newly conceived event is shown below.

[gtag('event', 'ga4test', {
  'chapter': '2',
  'page': '43'
});]

The name of the event and the parameter can be taken from the list of default or recommended names, or you can invent new ones. An event can have up to 10 parameters.

When you use the predefined names, the combinations flow directly into preconfigured reports. As shown below, you can send downloads for your own files.

[gtag('event', 'file_download', {
  'file_name': 'biketour.gpx',
  'file_extension': 'gpx',
  'link_text': 'Bike Tour Download GPX',
  'link_url': '/downloads/biketour.gpx'
});]
In the example shown above, downloading a GPX file is not automatically captured by the Google tag. The calls are displayed together with the automatically collected calls in the same list.

You can use these event names in combination with automatic naming to extend the functions. Alternatively, you can use the names and fields for your own solution, for example, to implement the tracking of external links.

Event Limits

Another advantage to using the recommended names exists: GA4 has already reserved memory locations for these events in its internal database. If you create events with new names and parameters, these events receive memory from their own limited area.

This feature allows you to enter 500 different event names per property. However, the automatic and recommended event names are not included among these 500 different names. If you follow the recommendations for GA4, you have more scope for your own additions.

Similar limitations exist for parameters: A GA4 property can have a total of 50 different parameter names across all events. This maximum number does not apply to automatic and recommended parameter names.

Events with Google Tag Manager Tags

If you add the GA4 tag to your website using Google Tag Manager, you can create additional events in your container. The same considerations regarding the use of names, parameters, and limits apply as with the gtag code.

For this approach, you must create a new Google tag in the container: GA4 event. You cannot enter the measurement ID in the subsequent window. Instead, you must select your previously created GA4 configuration tag.

In the Event Name field, enter your event name (regardless of whether the event name is new or recommended). In our example, file_download is used again. Enter the name-value pairs under Event Parameters, as shown below.

Google Tag Manager Event for Downloading Special Files
Google Tag Manager Event for Downloading Special Files

The triggering of the tag only occurs with the correct trigger in Google Tag Manager, which you must create and adapt for your website.

Editing Events

You can edit and change both event names and their incoming parameters within GA4. In each web data stream, you’ll find the Change events item in the menu. You can define multiple rules to change incoming events.

Each rule starts with a matching condition that compares one or more parameters you have specified for all incoming events. Parameters can include, for example, the event name, the file name of a download, or indeed any value introduced by you, as shown below. You can check up to 10 parameters in a single matching condition.
Creating an Event When the Event Name Arrives
Creating an Event When the Event Name Arrives

If the comparison is correct, the Modify parameters section will be executed, as shown below. You can use this section to overwrite, add, or delete a parameter of the event.
Changing the Event Name to “newsletter_signup”
Changing the Event Name to “newsletter_signup”

Changing and Overwriting

To overwrite a parameter, you must select the item from the menu and enter the new value in the second field. You can also make changes to parameters that appear in the matching condition. In the rule shown earlier, the change is executed if the incoming event has the name newsletter_submit. The event name is then changed to newsletter_signup. In the event report in GA4, you’ll only see the second event (i.e., newsletter_signup).

Instead of a fixed value, you can also insert another parameter as a value. For this task, you must place the parameter name in square brackets. In the example shown in Figure 2.23, the event name is overwritten with the value of the event_action parameter. You must, of course, make sure that this parameter value is transferred together with the event.
Replacing a Parameter Value with Another Parameter
Replacing a Parameter Value with Another Parameter

To delete a parameter, you can leave the New value field empty, as shown below.
Deleting a Parameter Value
Deleting a Parameter Value

You can specify up to 10 matching conditions in a rule. Just as you can add multiple conditions for the adjustment, you can also trigger multiple changes in one rule.

Adding Parameters

Even though the menu item is referred to as Edit event, it is not only possible to edit existing parameters. You can also add parameters to an event that did not previously exist. For this step, you’ll need to proceed in the same way as for editing: You specify the parameter and a value.

Setting additional parameters for an event allows you to further organize the data within GA4. With this option, you can create content groups for pages or assign campaigns to specific channels.

In the example shown below, the page views (page_view) are checked to see whether they originate from a page in the /blog/ directory. If yes, the content_group is set to the blog value.
Adding a Content Group to an Event
Adding a Content Group to an Event

Deleting Parameters

You can delete existing parameters by simply leaving the field for the value empty.

Creating Events

You can define new additional events under the Create custom events menu item. These events do not differ for GA4 from other events, for example, from Google Tag Manager.

The input mask looks similar to that for Change events. In the case of a created event, however, not only are parameters changed or added if the matching conditions are successful, but a completely new event is generated. This new event will appear under the assigned name in the event report, in addition to the triggering event. You can edit and change parameters for this new event in the same step.

In the example shown below, the contact_thankyou event is triggered as soon as an event of the page_view type with the page_location value /agency/contact/thankyou/ is received (i.e., a page view with /agency/contact/thankyou/ in the URL).
Firing a New Event When the Thank You Page Is Viewed
Firing a New Event When the Thank You Page Is Viewed

You can use created events to generate unique events if several conditions (up to 10) are met for an event. You have now become familiar with an important tool for setting up key events.

You can create up to 50 rules for both changed events and created events.

Defining Key Events

A website or app should have specific goals, that is, specific actions you want users to perform. The goal might be a completed purchase transaction or the sending of a contact form. To indicate to Google Analytics that these actions are particularly significant, you’ll need to define them as key events. Before 2024, Google Analytics referred to these actions as conversions.

Purpose of Key Events in GA4

Setting up key events allows you to recognize all important actions on your website at a glance. In reports, key events have their own column. Especially with large analytics setups for which you record dozens of different events for user actions, searching for individual entries in reports can quickly become tedious. Key events focus attention on the actions most relevant to success.

Key events make it easier for you to analyze entries, for example, in campaign reports. For each channel and each campaign, you’ll have a qualitative analysis in addition to the quantitative number of users, such as how many of these users have made a booking, as shown below.
Overview of the Channels with Key Events
Overview of the Channels with Key Events

Key events are a prerequisite for using the reports in the Advertising menu for campaigns and attribution. For users who have reached certain key events, the complete path taken by these users across all recorded channels and campaigns is analyzed. GA4 does not perform this analysis of paths across the board for all users, only in regard to a key event.

Another important function of key events in GA4 is its ability to be exported to other (Google) tools. You can import the GA4 key events into Google Ads as conversions for evaluating and controlling campaigns and ads.

Defining Key Events

To create a key event, you must define a single event from the GA4 report as such. You cannot specify any additional parameters or properties in the definition. This definition differs from previous versions of Google Analytics, in which there were different types of key events and you could specify an average session duration as a criterion, for example.

You can define key events in GA4’s administration settings. For this task, navigate to Data display • Events under Property settings. The system then displays a list of all events that have entered your GA4 property so far. In addition to the names of the events, the number and users as well as the changes in a certain period of time are displayed in the table, as shown below. You can select the period above the table via a calendar element.
Selecting Key Events in the Event List
Selecting Key Events in the Event List

At the end of each line, a toggle button indicates whether an event is a key event. Activate the toggle by clicking to the right, and the definition is highlighted. Activated key events are counted from this point onwards. Events that have already been recorded are not retroactively regarded as key events.

Under the Key events tab, you’ll find entries that have already been defined as well as some columns with values in this table. The Count (% Change) and the Value (% Change) are displayed as well as the trend compared to the reference period, as shown below.
List of Key Events with Calls and Values
List of Key Events with Calls and Values

In contrast to the previous table under Events, you won’t see the total number of events, but the measured key events since the definition was set up.

Even in a property that has just been created, you’ll find an entry, namely, purchase. In contrast to other entries, the toggle button is grayed out.

Purchase is a predefined key event. As soon as GA4 receives an event with this name, it is also counted as a key event. This behavior is based on the assumption that a completed purchase is always relevant for an offer. The automatic function means that a GA4 user cannot forget to set up the definition in the first place.

Automatic key events are not counted towards the maximum limit of 30 key events per property. In addition to purchase, other key events exist for apps. As soon as you create an app data stream in a property, these key events appear in the list, as shown below. The Network settings tab also refers to apps and their key events/conversions.
Automatic Key Events for Apps
Automatic Key Events for Apps

You now know how to save an existing event as a key event. This event must first be called in order to mark it. You’ll lose these first calls as key events, as GA4 only counts relevant events from the time they are set up.

In this case, you can click the New key event button in the configuration. An input window appears in which you can enter an event name, as shown below.
Setting Up a Key Event Before the First Call
Setting Up a Key Event Before the First Call

If this event is subsequently logged by GA4, it is a key event from the very first call. (You can also use the form for an existing event, in which case it will be marked accordingly. But with the toggle button, is no danger of a typing error.)

A third option for defining key events is provided by GA4 in the Events report. At the end of each line, click the three dots icon and select Mark as key event, as shown in Figure 2.32.
Marking a Conversion in the Event Report via the Menu
Marking a Conversion in the Event Report via the Menu

Planning Key Events

Defining key events is easy if you have clear events for important actions in the report. You’ll often have to define these events yourself, either by programming them in the code or via Google Tag Manager, or by creating events in the administration settings.

If you define events for certain actions, you must ensure that the successful action can already be recognized by its event name. For example, let’s say your website contains a contact form. When the form is sent, an event should be triggered in order to mark it as a key event later.

The name of the event could be send_contact. This event might be triggered every time a user submits the form. If an error occurs, the error value is transferred in the error parameter. The problem is that, in GA4, you cannot directly use this process to define a key event for successful sending. The better solution for an event is the name contact_successful or to use Google’s recommendation, generate_lead.

To map the form in GA4, you must combine the Category and Action fields with contact_successful or contact_incorrect.

But how do you deal with incorrect entries? For example, if a form has 12 possible error messages, then individual events for each case could quickly become confusing. You don’t want to mark the incorrect input as a key event, so you can bundle different errors into one event and differentiate between them using the parameter. In GA4, for example, you might break down an event as shown in below.

Event Name and Parameters in GA4

For the error parameter, you must create a custom dimension. This approach allows you to keep the event report compact and avoid the risk of reaching the limit of 500 different events per property.

If you want to mark a key event for different values in multiple parameters, you must take this detour via a Create event rule. First, create an event as described earlier. Then, set up the key event for this new event.

Using Custom Definitions

Many events have fixed parameters that can be filled in automatically when they are called. In the file_download event, for example, predefined parameters might include the name and extension of the file that is downloaded. If these parameters are not sufficient for your use cases, you can use your own parameters in Google tags and analyze them using a custom definition.

With custom dimensions and metrics, you can add your own parameters to the predefined Google Analytics dataset. You can add these additional dimensions or metrics to the various reports or create your own reports with this data.

Sending Parameters to GA4

To send custom parameters to GA4, you must pass them in the tracking code. All you need to do is insert the parameters using their names and values. Let’s return to our example of custom events, shown below.

[gtag('event', 'ga4book', {
  'chapter': '2',
  'page': '43'
});]
The event name in this case is ga4book, and the parameters are chapter with the value 2 and page with the value 43. Using this call, you first send these parameters to GA4, which accepts and checks them.

You can see the incoming values immediately in the Realtime report, as shown below. But only if you have created a custom dimension for chapter and page will the entered value be saved. You can use this self-defined dimension like other dimensions in reports, including in your own reports.
Incoming Values in the Realtime View of an Event
Incoming Values in the Realtime View of an Event
Creating Custom Definitions
To create custom definitions, go to the Manage section in the GA4 property and then click on the Custom definitions item to create your own dimension or metric. You should assign a meaningful name and description to explain the contents, as shown below. The Dimension name field appears later in the GA4 reports for selection.

An important specification is the Scope, which describes the scope of your dimension. GA4 has different variants in how it saves parameters and links them to other data. If the Scope is set to Event, the parameters and values are only saved for the event with which they were transferred.

In contrast, the alternative User setting links the values for the transmitted and all other events for this user. The value only needs to be transferred with an event, but you can still track what else this user has done later. A typical use case is the registration for a service or an offer: The user registers only once, and only this information is transmitted to GA4 and only once. With a filter on this dimension, you can track all other actions that have been logged for this user.
Defining a Custom Dimension
Defining a Custom Dimension

The Element level section is of particular interest for e-commerce: If you want to add data to your items, you’ll need a dimension at the item level.

As the last step on the dimension setup screen, either select the Event parameter to populate the new dimension from the list or enter the parameter name. The input must be made in the same way as the parameter name is transferred in the gtag code, as shown above.

Creating a custom metric is a similar process, with a few minor changes, such as the following:
  • Metrics can only have an Event as their scope.
  • You can also define an optional unit of measurement and choose from units for distances and times. Alternatively, you can define the metric as a currency field and specify whether the value is revenue data or cost data.

Limits of Dimensions and Metrics

For each property, you can define 50 custom dimensions and 50 metrics with the Event scope as well as 25 dimensions at user level. You can view your current consumption in the overview via the Quota information button. In this way, you can avoid having to count dimensions at the event or user level for a larger list, as shown below.
Quota Information- Number of Dimensions and Metrics Created for Your Property
Quota Information- Number of Dimensions and Metrics Created for Your Property

If you need additional definitions in a property but no more space is available, you can archive a dimension or metric that is no longer used. For this task, open the menu at the end of an item in definitions overview and select Archive, as shown below.
Archiving Dimensions and Metrics
Archiving Dimensions and Metrics

Archiving frees up space for a new definition but can affect reports, segments, and audiences since they can no longer use an archived dimension as an element in a report or as a criterion for a user group. The archived element disappears from the definition list.

Details of the Web Data Stream

So far, we’ve covered the settings options for events in the detailed view of the data stream. In addition, some other options are available, which we’ll describe in the following sections.

Data Stream: The Measurement Protocol API and API Secrets

The Measurement Protocol API of GA4 enables other services and programs by providing access to send events and values directly to a GA4 data stream. The data is processed as collected via the gtag and included in reports.

Access is protected by means of an API secret a type of password for program access. A program must always specify the API secret before data is sent to GA4. If the API secret is missing or has an incorrect value, GA4 rejects the data.

A best practice is to create a separate secret for each service that is supposed to send events. If you no longer want to use a service, you must remove the API secret; then the property is protected from unwanted events.

Data Stream: Removing Data

You should not enter any personal data from your users in GA4, such as names or email addresses, as shown in Figure 2.37. Google explicitly prohibits this action in the terms of use for Google Analytics. Sometimes, however, such values are included in events or in page URLs through form programming, for example.
Parameters with Email Addresses in the URL
Parameters with Email Addresses in the URL

Under the Redact data item, GA4 provides options to prevent critical data from entering from the outset, as shown in Figure 2.38. With the first switch (Email) activated, GA4 will attempt to recognize email addresses in the tracking data. If an address is found, that email address will be deleted or replaced by the term (redacted). You won’t see any email addresses in the GA4 reports later, only the replaced term.
Redacting Emails and Parameters in GA4 Data
Redacting Emails and Parameters in GA4 Data

With the second switch (URL query parameters) activated, you can open an input field to specify other URL parameters that should be redacted as well. URL parameters are attribute-value pairs that are appended to the pages after a question mark (?) in the address line of the browser. In the example shown in above figure, we have the first and last parameters. If these parameters appear in page URLs, referrers, or some other fields, they will also be replaced by (redacted).

You have the option of testing your settings for these two switches. For this task, insert a sample URL, including URL parameters. As shown in Figure 2.39, the result in the box on the right is how the URL will be included in the GA4 report.
Test Data Removal with Sample URL
Test Data Removal with Sample URL

These parameters are replaced when the tracking code is loaded (i.e., before data is sent to the Google Analytics server for collection). In this way, such marked data does not even leave the user’s browser.

Configuring Google Tag Settings

At the bottom of the page, you’ll see the Configure tag settings item in the Google Tag box. Click this item open the overview and settings for the Google tag.

You’ll see a few entries in the list of settings; click on the View more link to expand the list. Some configurations are grouped together that you won’t need in every setup, but you should know what GA4 can do and what it provides.

Tag Quality

The tag quality setting enables the classification of all metrics that are carried out with the Google tag. The status is classified at different levels, from Very good to Urgent.

Click on an issue, and you’ll see information that you should check depending on the severity. The positioning of the tag code in your page may be flagged, or you may be referred to the domains set in the Google tag. In addition, points for the correct evaluation of campaigns are checked, such as the consent data transmitted and the use of the conversion linker. However, not all notices are problems that need fixing. For example, the Google tag likes to point out pages with missing tags, but this includes pages that you explicitly don’t want tracked, for instance, the admin area of a page. In such cases, you can ignore the “error.”

Managing Automatic Events

The automatic event detection of the Google tag overlaps with the settings of the optimized analyses. You can also configure the recording of downloads or video events here. However, the Google tag is the basis for further tracking, and thus, you must have activated these options in both the data stream and in the gtag.

Configuring Domains

Sometimes, your offering involves not just one website, but multiple websites. These websites might be located in different domains, such as company.com and company-store.com. Many users first start on company.com and then switch to company-store.com. You may want to analyze the users of the two websites in a coherent way, for example, to see which campaigns led users to the company website and then converted into an order in the online store. For this kind of tracking, you must configure cross-domain tracking.

The prerequisite for cross-domain tracking is that you must use the same measurement ID in the Google tag on both websites. The data from the different websites must therefore enter the same property and the same data stream.

Under the Configure domains menu item, you must enter all domains for which users are to be regarded as being linked, as shown in Figure 2.41, that is, both the domain for which you originally set up the property and the additional domains.
Domains That Shouldn’t Count as References
Domains That Shouldn’t Count as References

GA4 attempts to establish a connection with users on these two domains. Since comprehensive access to the cookies of the domains does not work, GA4 requires a different recognition feature: The Google tag appends the ID of the respective user or session as a parameter to the URL to all links from company.com to company-store.com, and vice versa. When clicking on a link between the two domains, a user lands on the URL https://www.company-store.com/?_gl=1*adgucvs5*. The _gl parameter is recognized and processed by the Google tag on the second domain, and the connection is established.

The necessary parameters are appended to the links between the domains. Conversely, however, GA4 has no chance of recognizing users who switch between domains without a link. For example, a user who first visits the main domain from a Google search, then returns to the Google results page and from there switches to the store domain, will not be recognized by GA4 as the same user.

As a side effect, GA4 no longer considers links between these two domains as external links. Thus, these links are no longer counted as separate events by the clicks on external links optimized analysis.

You can also transfer the necessary settings for automatic cross-domain tracking to the gtag code or Google Tag Manager. More information about setting up the code is available at https://developers.google.com/tag-platform/devguides/cross-domain.

Reading User Data

With some Google services, such as Google Ads, you have the option of processing users’ personal data to improve the accuracy of conversions and audiences. Google refers to this data as data provided by users. These data points include, for example, the name or email address, as shown below, which the Google tag can either read from the website or receive explicitly in the tracking code.
Handling Data Provided by Users
Handling Data Provided by Users

Within Google Analytics, this data is not used for reports, but the Google tag passes it on to these systems for processing if Google Analytics is linked to Google Ads or DV360.

Tracking Universal Events

The option is used to record events from an old tracking code that was used for the GA4’s predecessor, UA. UA has not collected any data since summer 2023, and the properties have been deleted since summer 2024. If you’re still using this code, switch to the current version with gtag or Google Tag Manager.

Marking Internal Traffic

Internal traffic refers to the access of your own employees and developers to a (company) website. Usually, you don’t want to include these hits in your own user analyses because your own employees and your colleagues behave differently on a website than other visitors, since they know the website, products, and content better. The same applies to access from agencies or service providers who manage your campaigns and your websites, for example.

To set up the filter, you first need the IP addresses that you want to filter out. To gather this information, ask around internally, ask service providers, and ask external employees what their IP addresses are. But remember, filtering by IP is only useful if you have fixed IP addresses that don’t change regularly. Learn more about IP addresses in the information box later in this section.

To find out your own IP address, use Google to search for “What's my IP address?”

With regard to IP addresses, you must distinguish between static IP addresses and dynamic IP addresses. Static addresses always remain the same, a device is assigned the same IP address every time. With dynamic addresses, a device is assigned a new address each time it dials into the network. As a result, excluding the IP address of any given user could be difficult, maybe even impossible, because their IP address can be different for each session.

Another point that often requires consideration at large companies concerns what are called IP ranges. As soon as a large company, with all its employees, browses the web via multiple IP addresses (instead of one), you’ll need to define an IP range. Therefore, quite possibly, you receive the following information from your internal IT department: 176.154.1.1–25. This cryptic series of numbers means that your company is connecting to the internet under the IP addresses 176.154.1.1, 176.154.1.2, 176.154.1.3, and so on.

In the additional settings under View more, you can define internal traffic and thus exclude it from the analyses. For this exclusion, you’ll need to create a new rule and assign a name. Then, enter the addresses to be filtered in the IP addresses section, as shown below.
Filtering IP Addresses to Clean Up GA4 Traffic
Filtering IP Addresses to Clean Up GA4 Traffic

As shown above, the IP address is specified in what’s called CIDR (Classless Inter-Domain Routing) notation. You can also enter entire addresses or parts of them. As GA4 automatically anonymizes the last digit of the IP address (i.e., virtually deletes it), a filter on the first three digits of an IP address is usually sufficient, as shown below.
Specifying a Filter for Parts of an IP Address
Specifying a Filter for Parts of an IP Address

You must then activate the filter for it to start working by going to the administration settings under Data Settings • Data Filter.

For the internal traffic type, the Current state is Testing. In the context menu for the item, select Activate filter (or edit the item and set the status there to Active). Only then will the access events actually be excluded from your reports, as shown below.
Activating the Filtering of IP Data
Activating the Filtering of IP Data

Ignoring Unwanted Referrals

In the list of unwanted referrals, you can enter domains that should not be considered links from an external source in the future. Usually, a new session is started for users who come from a different domain (i.e., not from the domain that is currently displayed as the address when the Google tag is loaded in the browser). In UA, this item was called the Referral Exclusion List.

You do not want this behavior of starting a new session if the user has only left your offer for a short time, for example, to make a payment with a provider such as PayPal. For this payment, the user leaves the website during the order process but returns after a few moments (via a redirect or link) and continues on their way.

If the payment services are not on this list, a new session starts with paypal.com as the source, as shown below. Above all, the assignment between the user’s actual source of origin and the order or conversion is interrupted.
Excluding Payment Services from Referrals
Excluding Payment Services from Referrals

Defining the Duration of Sessions

With the Adjust session timeout item, you can define the runtime of sessions. By default, a session is ended in Google Analytics if no further calls are made for 30 minutes, as shown below. If another call is logged for the same user after the 30 minutes are up, GA4 starts a new session. This new session also occurs if a user has remained on a page of your website for the entire 30 minutes but has not produced any views.
When Does a Session End
When Does a Session End

For some offerings, increasing this value may be necessary. For example, do you have pages with particularly long texts that require a corresponding reading time? Or videos that can run for longer than 30 minutes? Users can also spend a long time with complex ordering processes or configurators. You can therefore increase this period to up to 8 hours.

The second setting on the page (Adjust timer for engaged sessions) allows you to specify the time from which a user is considered engaged, as shown below.
When Is a Session Considered Engaged
When Is a Session Considered Engaged

If a user stays on your offering for this period of time, GA4 automatically fires another event. In this way, you can differentiate between users who viewed your content at least briefly versus those who left immediately upon first viewing. The default setting is 10 seconds, which you can increase to 60 seconds. The higher the value, the longer users must stay on your website before an interaction is recorded for them.

Life Cycle of Analytics Cookies

Google Analytics uses cookies to recognize users and thereby connect multiple sessions of a user. The Override cookie settings menu item enables you to change the cookie runtime and the general behavior of the cookie, as shown below.
How Long Should a User Cookie Remain Valid
How Long Should a User Cookie Remain Valid

By default, the Google tag sets a cookie with a duration of 24 months. If a user visits the website again within this time, GA4 recognizes the new visit based on the cookie. After this time, the cookie automatically loses its validity. From this point onwards, a user is counted as a new user again.

If you activate the option to overwrite the default setting, you can set a maximum validity of 25 months. The other option (Cookie update) can drastically extend the runtime: By setting Set cookie expiration time relative to most recent visit, a user’s cookie is rewritten when they visit again. Thus, the validity period is extended over and over.

If the expiration time is set relative to the first visit, this user will be counted as a new user again after 25 months at the latest.

Changing the Default Consent Mode

This option can be regarded as a security switch for using the consent mode. If you activate one or both switches, the Google tag will only forward data if it receives explicit consent from the user.

Although the Google tag behaves in the same way by default, this default setting can be changed, and then users could be measured by Google for advertising without having given their explicit consent.

Automatic Consent to Data Collection

By default, Google only processes the data collected with the Google tag if the user’s consent is transmitted via the consent mode.

This option allows you to change the default behavior and process all data as if users had always given their consent, as shown below. You should only use this setting if you have used Google Tag Manager or another procedure to ensure that the Google tag is only loaded with the user’s consent.
How Should GA4 View Incoming Data
How Should GA4 View Incoming Data

Setting Data Usage for Other Google Services

If the users of your website consent, Google may pass on analytics data to its own services. This feature allows Google to analyze the success of certain user actions, for example, as part of campaigns. By default, this setting comprises All Google services.

However, you can also exclude some or all services from data transfer, as shown below.
Controlling the Transfer of Data to Other Google Services
Controlling the Transfer of Data to Other Google Services

In this post, you learned how to create and set up an analytics measurement process. We covered the settings for both the property and the necessary Google tags.

The integration of gtag in your system forms the basis for measuring user activity across websites and apps. Google Analytics supports you with automatic events and features when collecting data to analyze campaigns or stores.

The following posts will describe how you can further adapt your setup to meet your specific requirements and then analyze the data you collect.

COMMENTS

Name

AI,15,Data,4,Strategy,4,Tech,12,
ltr
item
Strategic Leap: Transform Your Web Strategy: Effortlessly Set Up Google Analytics 4
Transform Your Web Strategy: Effortlessly Set Up Google Analytics 4
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9PMrBGfx7A8Ijzzzq4_LYkAXWQTGIZ0dQtY-SsYSZ3lWVrHZHhvdjLwT4aAavZNNFVZ5mVhHQRGRuhgPxFezpZPzENXsw8IY4NiTXGOXjgXq-B5hEvt2HaPrLMCJkYZXAOqMt6xSFIrKPM5n4JvSm-7NSLx4qldukcwVhTq_4KOBfb3uDozshtRKiZvs/w640-h428/Set%20Up%20Google%20Analytics%204.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9PMrBGfx7A8Ijzzzq4_LYkAXWQTGIZ0dQtY-SsYSZ3lWVrHZHhvdjLwT4aAavZNNFVZ5mVhHQRGRuhgPxFezpZPzENXsw8IY4NiTXGOXjgXq-B5hEvt2HaPrLMCJkYZXAOqMt6xSFIrKPM5n4JvSm-7NSLx4qldukcwVhTq_4KOBfb3uDozshtRKiZvs/s72-w640-c-h428/Set%20Up%20Google%20Analytics%204.jpg
Strategic Leap
https://strategicleap.blogspot.com/2025/11/Set-Up-GoogleAnalytics4.html
https://strategicleap.blogspot.com/
https://strategicleap.blogspot.com/
https://strategicleap.blogspot.com/2025/11/Set-Up-GoogleAnalytics4.html
true
5160727563232597795
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content