How to install Google Analytics on the site?

How to set up Google Analytics on the site? Web analytics

To evaluate the success and efficiency of any web resource, from a personal blog to a large online store, several criteria are used: the number of unique visitors, revenue, conversion, and so on.

Analytical services allow you to track almost any parameters, evaluate them, compare them with previous periods and make management decisions based on the information obtained. In this article we will tell you how to set up the most popular of such systems – Google Analytics.

What is Google Analytics?

Google Analytics is an analytics system that performs continuous monitoring of a web resource’s performance. This free tool allows you to:

How many calls and sales will I get by ordering contextual advertising from you?

I need to calculate the conversion of my website Describe
the task
in the application

Calculate potential ad revenue Google
contextual advertising calculator

  • Analyze traffic sources;
  • track conversion rates;
  • Evaluate the dynamics of attendance for a certain time interval;
  • define visitor profile: location, age range, device used;
  • record the duration of sessions.

For the correct operation of the service, each page of the site must have a certain piece of software code that registers visitor behavior and records data in the database. Based on this information, reports are subsequently compiled.

What are the advantages of using Google Analytics?

  1. A wide range of tools. Some of them are considered the benchmark in web-analytics: a large set of attribution models, multichannel sequences, cohort analysis and so on;
  2. Flexible approach to generating statistical reports. For convenient analysis of individual data segments, the service provides a tool of special reports. You can present the results in the form of graphs, charts or widgets using the Data Studio functionality, creating dashboards and grouping reports in a variety of ways;
  3. Online analytics. If you use Google Analytics for large projects, there may be some delay in uploading information. Nevertheless, the service provides an opportunity to get a convenient real-time report, which is indispensable when evaluating the truth of hypotheses and the effectiveness of changes;
  4. Multilingual interface. According to statistics, more than half of Internet users use the tools of the analytics system created by Google. And for sites whose audience lives outside of Ukraine and CIS countries, this platform is simply indispensable.

How to get a tracking ID in GA4?

To get an ID in Google Analytics 4, you need to create a new account in the system or use an existing one. If you do not have an account yet, go to https://analytics.google.com/analytics/web/ and click “Create an account”.

Registering a Google Analytics account

In the first step, you will be asked to provide basic information about your company or project. Here you need to fill in the name, industry, size of the organization and the main tasks you plan to perform with the help of analytics. This will help Google better understand your business and provide more relevant recommendations.

In the next step, you’ll need to accept the Google Analytics Terms of Use. Next, select the type of resource you want to track: website, mobile app, or both.

After that, a form will appear in which you need to enter the exact URL of your website. Please note that you need to specify the protocol (HTTP or HTTPS) so that GA4 collects data correctly.

Настройка потока данных

Additionally, think of a name for the data stream – it can be the domain name of your website or any other recognizable designation.

After that, you should click on the “Create Stream” button. In a few moments, the system will generate a unique tracking ID and GA4 counter, which will be required for further customization of analytics on the site:

Copy the tracking code

How do I add a Google Analytics counter to a website?

There are two main ways to add Google Analytics to a website. You can insert the code manually on each page of the site or use the GTM service for this purpose. Let’s analyze each of the methods in detail below.

Placing the code manually

Copy the resulting tracking code and paste it on all pages of the site in the <head> section. Try to place the script as high as possible in the source code of the page so that it is one of the first to load. This will ensure the collection of the most accurate and complete statistics on site visits.

Be careful when inserting code – it should not be placed inside other tags or scripts, as it may lead to incorrect page display. If you do not have enough experience with HTML and CSS, it is better to delegate this task to a professional web developer to avoid possible mistakes.

Below are instructions on how to add GA code to the templates of the most popular CMS:

WordPress

Authorize in the admin panel and go to Appearance → Theme Editor.

WordPress Template Editor

Select the active theme and open the header.php file.

Insert the Google Analytics code into the header of the site

Opencart

In the admin panel, select “Add-ons” → “Analytics”. Click on the icon next to “Google Analytics” and paste the code in the window that appears.

Joomla

Go to “Extensions” → “Template Manager”. Select the desired template and click the “Change HTML” button. Here and place the code copied before.

MODx

Go to “Elements” → “Manage Elements” → “Templates”. Open each template used on the site and add the GA code to the <head> section. A more convenient option is to create a special chunk with the counter code and call it in the site header.

How to connect Google Analytics with GTM?

The easiest and fastest way to connect Google Analytics to a website is to use the Google Tag Manager tool, where you can customize and execute standard or specially designed tags without involving the specialists who developed the web resource. The service is also used for mobile applications. It reduces the size of program code and scripts, which allows you to significantly optimize the download speed.

Open the start page of the service and register. In the window that appears, you will see a script that must be inserted into the program code of all pages of your Internet resource.

Important! One code fragment should be inserted before the closing </head> tag, and the other should be placed right after the <body> tag.

Use the “Tags” item and click on “Create” to generate a tag linking the site to Analytics:

How many calls and sales will I get by ordering contextual advertising from you?

I need to calculate the conversion of my website Describe
the task
in the application

Calculate potential ad revenue Google
contextual advertising calculator

Linking your account to Google Tag Manager

Then click on “Tag Configuration”, the type is “Universal Analytics”, and select the tracking type from the “Page View” list:

Set the tracking type to page views

Next you need the “New Variable” item. Enter the Google Analytics ID you received when registering in this system into the corresponding line of the dialog box that opens. Enable the functions for the contextual media network by checking the checkbox in the advanced settings.

Save all changes and complete the setup by sending the data for publishing using the “Submit” button that appears.

Google Analytics account structure

The Google Analytics account hierarchy involves three levels of data:

  1. Account. You can have a maximum of 100 different accounts connected to your Analytics account at one time. It is a kind of folder where you can connect several different resources. The system allows you to open account-level access for other Google accounts.
  2. Resource. You can add up to 50 resources per account. A resource can be a website or a smartphone application whose activity you want to track.
  3. View. The system provides the ability to add 25 views for each tracked resource. They can display different targets or subdomains. As an example: a subdomain with the English version of the site is one view, and the Ukrainian version is another.

How to set up a view in Google Analytics?

A view is a report on the basis of which you can analyze certain parameters of a web resource. A counter with basic parameters aggregates information about all traffic. If you need to configure Google Analytics on your site in such a way that visits from certain URLs or work traffic of your colleagues are not taken into account, you can set the corresponding filters by creating a new view.

You can do this in the “Views” module in the administrator settings section, where the corresponding link at the bottom of the page on the left leads to. It is better not to change the default parameters in the working view – this way you will always have access to the full amount of statistical data.

Creating a new view

To create a new view, create a duplicate of the current view using the “Copy” button and set the values of the filters you need.

The report can be based on:

  • subdomain statistics;
  • traffic cleared from internal views of the company’s employees;
  • traffic directed from friendly resources, etc.

What can I track on my website after installing Google Analytics?

The information collected by the analytics system is used to analyze the effectiveness of marketing activities and find the “thin” spots of a web resource. It also helps to create a portrait of the audience. Next, let’s focus on the most interesting reports, which can be found in the menu located in the left sidebar.

Attendance

This metric is most convenient to evaluate by uploading the “Traffic Sources” report, for which you should go to the section of the same name and select “Source/Channel” in the “All Traffic” menu.

All sources are displayed here: both advertising and organic traffic. At the same time, you can evaluate data for each channel separately by setting the necessary time interval. The service also allows you to compare indicators in dynamics.

Demographic data

You can find characteristics such as gender, age range and geographic location of users in the Audience report.

It also displays information about the devices of your web visitors, the percentage of new users, their interests, and the language settings installed in the operating system. For summarized data, use the “Overview” item in this section:

Summary of demographic data

User Behavior

If you have installed Google Analytics code on your website, then by selecting the “Engagement” menu item in the “Behavior” subsection, you will be able to quickly assess how much time visitors spend exploring your web resource:

User behavior on the site

For multi-page sites, it is useful to periodically analyze individual page traffic statistics and evaluate internal user movements. To do this, use the “Overview” item in the “Behavior” section:

List of popular pages

Here you can also view the user map, which shows which pages the visitor navigated through. The report helps to find the “thin” places of a web resource – if a large share of the audience decides to leave the site while on a certain page, there are probably some problems on it.

Events

To have an idea of whether visitors are taking targeted actions, set goals for the system to track. This can be filling out a form, subscribing to a newsletter, making a purchase, etc.

Statistics on different domains

The analytical system allows you to collect data from different domain resources within one session. This may be necessary if order placement takes place on another site (for example, online payment is connected there).

If you do not configure cross-domain tracking in your account, a user’s transition to another site is equivalent to the start of a new session for a new user. If cross-domain tracking is configured, such transitions will be counted as one session for one user.

How can I check if the counter has been configured correctly?

If the Google Analytics counter has been set up correctly, the “Overview” block, which can be accessed from the “Conversions” -> “Goals” section, will display information about how many times and when users visited your website from search engines or social networks, as well as the targeted actions that were defined in the previous step.

The analytics system allows you to continuously improve your offer based on the latest information about customers and their behavior. You will also be able to evaluate the effectiveness of different promotion channels.

Сергей Шевченко
Rate author
Adwservice
Add a comment

Sergey Shevchenko Google Logist GoogleLogist
GoogleLogist
Google Ads 90 Days Package, will help make your advertising campaign not only profitable, but also increase sales from it