Go to https://analytics.google.com/analytics/web/ and click the "Create Account" button.
Name the account as the website domain without protocol and slash and click "Next".
We add GA4 to the name of the resource to distinguish the resource from Universal Analytics. Then we select the country, time zone in which the site operates, as well as the currency of the site.
If you want to track data in Google Analytics 4 and Universal Analytics side by side, click "Show advanced options", turn on the radio button, name the resource with the domain name and select "Create two types of resource: Google Analytics 4 and Universal Analytics".
Here you can also choose to create only the Universal Analytics resource.
Select "Hide advanced options" and the "Next" button. We select the desired industry category, for example, "Purchases" for an online store. Next, we specify the size of the company, mark all the options for use and click the "Create" button.
Then you need to select the country again and agree to the terms of use of the analytics service.
A new Google Analytics 4 account has been registered, now let's start setting it up.
To create a new resource for a site on which Universal Analytics is installed, you need to go to the "Administrator" panel, in the "Resource" column, click on "Upgrade to GA4", and then the button - "Get Started" and "Create a resource".
Go to "Data Streams" and click "Web".
Enter the site URL, name the stream, turn on advanced statistics (if it is disabled), double-check that everything is included in "Enhanced statistics:", and click "Create stream".
After creating the flow, the indicator ID will appear, you need to copy it by clicking on the copy icon. Since I will be adding code to the site through the Google Tag Manager already installed on the site, I click "Use an existing tag on the page" and follow the instructions from the interface.
Go to https://tagmanager.google.com/, to the "Tags" section and click "Create".
Name the tag, click on the tag configuration and select "Google Analytics: GA 4 configuration".
Paste the indicator ID copied in Google Analytics 4.
Click on the activation trigger, select "All Pages" and save.
Once a tag has been created, it must be submitted and published.
When publishing a container, you need to enter a description of the version, you can skip this step
Let's go to Analytics. In the admin panel, click "Data collection", activate Google signals (collection of interaction data and remarketing across devices) and press three buttons in sequence: "Start", "Continue" and "Activate".
Check if the slider is lit, indicating the activation of the collection of Google signals, and click "I confirm".
We agree to the collection of user data.
In the "Administrator" panel, select the "Data storage" tab and set the maximum allowed period to 14 months. Save.
In the "Default Report ID" tab, select the method by which we will identify users, and click "Save".
It is better to set up a connection with Google Ads in your advertising account so that you do not forget to enable automatic link tagging when creating a new Google Ads account. If your Google Ads account has already been linked to a Universal Analytics property, then the link to Google Analytics 4 will be established automatically, but audiences and conversions must be imported separately.
When creating GA4, all conversions will have to be reconfigured. To set up the conversion - for example, let's take a look at the transition to the cart page - go to the Tag Manager, create a tag, name it and select "Google Analytics: GA 4 event" in the configuration.
In the drop-down window "Configuration tag" select the tag created earlier. We call the event in Latin characters, I called it go_basket.
Add an activation trigger through the plus in the upper right corner.
We name the trigger, click on the settings, select the type "Page View".
Then the actions are:
We save the tag, send it and publish it. The description can be skipped.
Go to the Tag Manager workspace and turn on the preview, enter the site in the field, click Continue and in the next tab go to the site in debugger mode (the debugger adds ?gtm_debug=x to the site URL, for example, https://your-sait.com /?gtm_debug=x) and go to the cart page. Our event should fire.
If everything is set up correctly, then in Analytics, after a while, the go_basket.*** event will be displayed in the "Real-time Report" tab.
To make this event a target, go to events, find the one you need and set the switch to on.
The conversion will now show up in the Conversions section within 1-2 days.
After setting up conversions, we proceed to setting up the audience through the admin panel or through the "Audiences" report. In the admin panel, select the "Setup Assistant" tab and in "Audiences" click on "Define Audiences".
By default, two audiences are created: "All Users" and "Customers". But the latter won't work until ecommerce is set up for the Google property.
Analytics 4.
We create a new audience that will collect users who have made a conversion - click "New Audience". Then click "Create a custom audience".
We give the audience a name and define the event we need.
Select the event_count parameter.
In the "Condition" field, set more than 0, in the "Time period" - 7 days (we focus on the deal cycle) and click "Apply".
We set the data storage period, look at the size of the audience in the summary. If you just created a goal, then there will be no data in the summary and the size of the audience should be rechecked in 1-2 days. Save.
This completes the basic setup. We figured out why you should switch to Google Analytics 4, how to register it, install it, and how to set up simple conversions and audiences.
To connect Google Analytics to your website, go to the "Promotion" - "SEO Settings" - "Google Analytics" tab and add this identifier in the "Google Analytics ID (Measurement ID)" field.
Additionally, you need to fill in the "Google Analytics Secret (API)" field. This value can be taken or generated in the data stream settings in the same window where the Measurement ID is located: Settings - Data Streams - Your Project Name - Measurement Protocol API Secrets. On this page, you must confirm the user agreement, after which the "Create" button will be unlocked. After clicking it, enter a random name and click "Create" again. After creating the API Secret, you need to copy the "Secret value" and paste it into the "Google Analytics Secret (API)" field in the admin panel.
Where can I find my Google Analytics ID?
To find it, do the following: