How to install and configure Google Analytics (Google Analytics) - complete instructions. Correct setting of Google Analytics Installing Google Analytics

We updated this stuff in summer 2019. Enjoy reading!

Google Analytics is a web analytics service from Google that allows users to get free statistics on website visitors and their actions on the conversion path. Working with it begins with installing a Google Analytics counter on the site. In this manual, we have described the steps for setting up and installing the counter.

1. Creating a resource

Sign in to the Google account you want to create a counter on, go to https://analytics.google.com/ and click.

You need to add the resource that you plan to analyze to your Google Analytics account.

  1. As a resource, you can select website or mobile app... In this manual, we describe how to install the Google Analytics counter on the site.
  2. Account name... In the Google Analytics hierarchy, the account is at the top level. It can include 50 or more resources, below which are views. A convenient name for an account is the company name.
  3. Fill in the fields Name of the site and Website url... Select protocol prefix http: // or https: //.
  4. Please select Industry from the proposed list, it should correspond to the field of activity of your organization. If there is no suitable one, you can specify the closest to your industry.
  5. Please select Timezonein which the audience of your site is located.
  6. Check the boxes for privacy and data access settings.
  7. Click the button Get Tracking ID and the system will offer to read and accept the terms of use of the service - enter the correct country and save.

2. Setting up a resource

After you have created a tracking counter for a property, the system will direct you to a page where you can manage the resource settings. Let's consider the main ones.

The tracking ID and tracking code are available on the page - they are needed to add the Google Analytics counter to the site.

But before that, you need to make a few more settings.

In the section include functions for advertisers:

    Remarketing - the function activates remarketing lists.

IN Resource settings there are a few more options to enable: demographic reporting and improved link attribution.

If you have enabled the option, it will replace "Remarketing and features for advertisers" as soon as you activate it.

After enabling it, your account will also display additional user data and reports for different devices.

3. View settings

In this section, you can customize an existing view or create a new one.

Be sure to check if the field is filled in "Currency"... Setting the currency is necessary for setting goals and tracking Ecommerce.

Make sure to check the box next to it. Thus, the system will exclude sessions performed by robots.

4. Installing the tracking code

After that, you need to go back to the account level and copy the tracking code. It can be installed on the site in two ways:

  1. Add a global tag to the site's source code after the opening tag on every page. The higher the counter code is placed, the better.

    You can delegate this task to developers or install it yourself.

  2. Using Google Tag Manager. Detailed installation instructions are in our.

Google Analytics is a free service for webmasters that allows you to collect and analyze statistics on website traffic, as well as data about visitors.

The information is collected by the Google Analyst counter - a small script placed on the pages of the site under study.

Using Google Analytics, you can track:

  • where visitors come to the site - from search engines (and by what request), by mailing, following links from other web resources, from social networks, directly - by typing the site's URL in the address bar of the browser and in other ways;
  • which pages the visitor went to, how long they stayed on them and what they did (what they viewed, where they clicked, which products they added to the cart, etc.);
  • what materials visitors recommend to friends using social media buttons;
  • geographic location of visitors (by IP address);
  • parameters of devices from which users visit the site (mobile gadget or computer, with what screen resolution);
  • operating system version;

In addition, Google Analytics transmits cookies to the browser to identify the visitor each time they visit the site.

Thanks to the service, you will know:

  • how many users have visited the site in a certain period of time;
  • what sources bring the most visitors to you;
  • in which regions your site is most popular;
  • which pages are the least popular and why visitors leave them;
  • do users perform the actions you need (purchases, orders, registration, etc.).

check in

To start using Google Analytics, you need to register with the service and have a Google account. Open the main page of the resource and click "Register".

Enter your password, your account username and click the "Register" button again.

After you log into Google Analyst for the first time, specify:

  • what do you want to track - website or mobile application;
  • tracking method (default is Universal Analytics);
  • name and website address;
  • branch (subject) of the site;
  • time and time zone.

In the sharing settings, leave the checkmarks next to the items you want. Then click "Get Tracking ID".

After accepting the license agreement, your account will be created.

Setting up

Note! After registration, you will be given a unique ID and tracking code, which must be placed on all significant pages of your site. After that, statistics collection will begin.

How do I add Google Analytics tracking code to my website?

Method 1.

  • Copy the tracking code between tags.
  • Paste it into the page code between tags ... The insertion point does not matter much.
  • Save your changes.

Method 2.

  • Copy the tracking ID UA- *.
  • Go to your site settings.
  • Open the counter management section and find the field to insert your Google Analytics ID.
  • Paste and save your changes.

Interface overview

Home page

The main page of the service displays a list of connected websites and basic statistics on them:

  • sessions;
  • average session duration;
  • refusals;
  • goal conversion rate (the ratio of the number of visitors who performed the actions you need on the site to the total number of visitors).

Note! Under the name of each resource there is a button "All site data". By clicking on it, you will go to the "Reports" page - to the section of detailed statistics.

Reports

By clicking on the "Summaries" sidebar, you will be taken to where all the attendance summary reports are collected. You can customize the type of reports yourself.

It is also possible to delete unnecessary bulletins and create new ones.

You can create shortcuts for quick access to the most important reports.

In addition, any report can be emailed, exported to PDF, and shown to other users.

If you need current site statistics, click the Live button in the side menu. The data on this tab can be tracked by minute.

Note! The "Real-time" subsection allows you to view all statistics at once or only one of its types - the location of visitors, traffic sources (where visitors came from), events, content and conversion.

Subsection " The audience»Will tell you which users come to your site. The data is provided in great detail, down to gender, age and interests of people.

From here, you will also find out from what device visitors come to you, how often they return and how much they are interested in your site (how much time they spend on it, how many pages are opened).

Subsection " Traffic sources»Provides the most detailed information from where and for what requests visitors come.

To track their progress from search engines, as well as the conversion of your goals, you need to link your Google Analytics account and AdWords.

This will allow you to view AdWords reports from the Google Analytics interface, and vice versa - import Analytics data into your AdWords account.

To link your AdWords account to Google Analytics, enter the subsection of the same name, click "Get Started" in the right part of the window and follow the instructions.

Subsection " Behavior»Displays information about the interaction of users with the content of the site. The statistics collected here allow you to assess the availability and usefulness of your materials.

And the last subsection “ Conversions»Will tell you how many visitors perform actions that are valuable to you: for example, buy products.

The type of goal must be pre-configured in the "Administrator" section.

Setting up

Google Analytics page « Setting up»Is intended for managing bulletins. Here you can view, categorize and import them from the gallery.

Administrator

Page " Administrator"Contains account settings and tools for managing statistics collection. It is divided into three sections: "Account", "Resource" and "View".

Tools section " Account»Allow you to set filters for viewing data in Google Analyst, and control access to your statistics for other users.

Section " Resource»Contains tools to manage settings for connected sites and links to other Google products - AdWords, AdSense, Webmaster Tools, and more.

There are also buttons for SEO - remarketing, importing data from other platforms and setting up receiving statistics from social networks.

In chapter " Performance»Collected tools for fine tuning statistics collection: creating goals for assessing the conversion of visitors, segments for obtaining detailed information about a specific group of users, annotations to reports.

And also - setting up alerts, mailings, labels, filters, e-commerce and more.

Google Analytics: setup and installation

How to install and configure Google Analytics (Google analytics) - complete instructions

The first thing to do is create a Google Analytics account. To do this, you must have an active Google account (Gmail mail). If you don't have it yet, sign up for Gmail.

To create a Google Analytics account, go tohttps://analytics.google.com/analytics/web/ .

Click the "Register" button.

On the next page, you need to fill in your account details.


What should be indicated here:

  • Account name. This is a shared account where you can manage all Google Analytics counters (if you have multiple sites).
  • Name of the site. You can write anything here. But for the convenience of working in your account, it is better to specify the site address (without "https: //").
  • Site url.
  • Industry. Choose the industry option that suits your site. You can choose any option, as this does not affect the work of the analytics system in any way.
  • Timezone. Select your country and time zone.

Click the Get Tracking ID button at the bottom of the page. A pop-up window with a user agreement will appear. Check the boxes and click the "Agree" button below.


Adding a counter to the site

After clicking the Get Tracking ID button, a page will open showing your tracking ID.

Also on this page is the counter code that must be added to the site to connect the analytics system.

Copy this code and place it on all the pages of the site you want to track. The code should be placed before the closing tag.

Note.Google Analytics and Yandex.Metrica systems take into account refusals on a website in different ways. Google Analytics considers a failure when a user has viewed only one page and left the site, regardless of the time spent.

Yandex.Metrica counts a rejection when a user has spent less than 15 seconds on the site.

For Google Analytics to display bounces correctly, you need to add an additional line of code to the counter code.

Collecting audience for remarketing

Go to the Data Collection tab and click the remarketing radio button. So the Google Analytics counter will collect the audience of site visitors, which can then be used for remarketing in search results or Google Display Network.

Setting up interest and demographic reports

To learn more about your site visitors, about their characteristics (gender, age, interests, etc.), include demographic reports. To do this, go to: "Audience" → "Demographic data" → "Overview".

Google Analytics will collect detailed data on the site's audience. These reports will help you understand how the converting visitors differ from the regular visitors. The demographic and interest categories that appear in reports are used to target ads on the Google Display Network. These reports can be used to optimize ad campaigns.

Setting goals in Google Analytics

One of the most important steps in setting up an analytics system is setting goals. Correct setting of goals allows you to accurately track and analyze the conversion of the site.

To set up goals, go to the "Administrator" tab and select "Goals" in the "View" column.

Add a new target by clicking on the "+ target" button.


There are 4 main types of goals:

  1. Landing page. This type of goal tracks how users visit certain pages on the site. Suitable for tracking purchases, checkouts, registrations or subscriptions.

For instance. For an online store, the main target action is placing an order. The simplified customer journey looks like this: the customer selects a product → clicks the “Buy” button → enters all the necessary data → redirects to the thank you page (“Thank you for your order, we will contact you soon”). Users can get to the thank you page only after placing an order. Therefore, in order to track the number of purchases, you need to track visits to this page.

2. Duration. You can track the number of users who have spent at least 5 minutes on the site (you can choose any time interval).

3. Pages / screens per session. The goal is considered fulfilled if the user views a certain number of pages during one visit to the site.

4. Event. Specific user action on the site. For example, watching a video.

Enter the name of the target and select the type.

If you are tracking purchases or checkout, indicate the conversion value in monetary terms.

You can also track user behavior on the way to the landing page. To do this, turn on the Sequence radio button and specify the steps that users are expected to go through before reaching the landing page.

At the stage of choosing the target type, you can select the type "Event". Events are user interactions with site content. For example, watching videos, downloading files, or clicking on ads.

You can read more about setting up events ingoogle help.

Setting up e-commerce

For online stores, Google Analytics has a special functionality that allows you to track:

  • transactions;
  • the number of purchased goods;
  • total store income;
  • average check size;
  • the number of sessions before the purchase.

To track these metrics, you need to enable the e-commerce module. Go to "Administrator", in the "View" column select "E-commerce Settings".


Then turn on the tracking switch.

For the module to work, you will need to add a special code to the site. How to do this can be read ingoogle manual.

Once connected, ecommerce reports will be displayed here: Conversions → Ecommerce.


Link to an ad account

Link your Google Analytics account to your Google Ads account. This can be done in the "Administrator" panel in the "Resource" column.

After the accounts are linked, you can import goals and audiences into the Google Ads interface, use the data of the analytics system to adjust and optimize advertising campaigns.

Setting up audiences

In Google Analytics, you can create user audiences that can then be used in advertising campaigns. This requires that your analytics account is linked to your Google Ads account.

Go to the Admin panel. In the Resource column, select Audience Settings → Audiences. Turn on remarketing. Then you can add new audiences.


You can create up to 2,000 audiences for one site. Create at least a few basic audiences:

  • All users.
  • Users who reach the conversion goal.
  • New users.

The created audiences are automatically imported into your Google Ads account, where they can be used for remarketing.

Segments

Set up the segmentation of your website visitors according to certain criteria. Select the signs that help you draw conclusions about the quality of traffic coming to your site and set up segments for them.

Go to the "Admin" panel. In the "Representation" column, select "Custom Tools and Objects" → "Segments".


Here you can set up segments by:

  • demographic characteristics;
  • technological indicators (operating system, device type);
  • behavior on the site;
  • date of the first session;
  • traffic sources;
  • e-commerce module data.

Google Analytics reporting setup guide

You can view analytics reports in real time. To do this, select "Live" on the left sidebar and the desired report type.


You can also create dashboards in Google Analytics. Select Custom Reports → Dashboards in the sidebar.


Click on the "Create" button.


You can select "Blank Slate" and customize the display of the desired indicators in the summary. You can also choose "Import from Gallery" and use ready-made free dashboard templates.


Conclusion

We reviewed the basic settings of Google Analytics, with which you can track conversions and user behavior, analyze site performance and identify problem areas.

03.12.2018 Reading time: 11 minutes

Let's make a reservation right away: in the article, we analyze only the basic settings. GA provides a lot of opportunities for analyzing traffic and its structure, but to get started, you just need to familiarize yourself with the basics - how to install and configure Google Analytics in order to better understand your audience and see the site the way visitors see it.

How to create a Google Analytics (GA) counter?

  1. Sign up with Google (if not already):

Important: if you already have a Google account that is used in, register GA for it. This will be necessary for the Google Analytics statistics to be exported to the Console and you can use it.

  1. Sign up for Analytics using your Google account login and password:

  1. Enter your website details:

Pay attention to the protocol (http / https) and choose the one that your site is running on.

If you need to create Google Analytics for a website with a Cyrillic URL, use the Punycode converter and convert the address: unfortunately, Analytics does not yet accept Cyrillic URLs.

Enter the real reporting time zone, otherwise it will not be possible to collect adequate data on the time of site visit.

  1. It is better to leave all the checkboxes at the bottom - there will be no harm, but you can get interesting data:

  1. Next, let's see how to install the Google Analytics counter directly on a web resource. To do this, click "Get Tracking ID" and paste it into the site code on all pages before the closing tag:

  1. If the site already has a counter, but you are not sure if it is linked to your account, you can check by looking in the site code and finding the Google Analytics ID. The Analytics counter starts collecting data, you can start working. This is how the main page looks when there is no data yet:

Gradually, the Google Analytics counter will process the data from the site, and the page will fill:

Installing Analytics via Google Tag Manager (GTM)

If you have GTM installed, you can also install the Analytics counter using it.

  1. We go into the workspace, select the "Triggers" section:


  1. We create a trigger:


  1. Select the trigger type - "Page View":


  1. Change the name and save:

  1. Then go to the "Tags" section and create a tag of the Universal Analytics type:


  1. Go to the tag configuration, select a new variable in the "Google Analytics Settings", enter the tracking ID and bind the previously created trigger:

Then we save.

  1. We publish the tag by clicking the "Submit" button:


  1. Change the title, create a description and click on "Publish":


Objectives

A very important section with points of no return: setting goals in Google Analytics, due to the specifics of the service structure, does not allow you to delete them, only change or disable them. But this is still half the trouble: there can be no more than 20 of them in each representation. That is, if you create the wrong goal, then, of course, you can reconfigure it, but you have already used one of 20 possible chances.


Pay attention to the number of targets remaining

Any action that you are interested in as a site owner can be assigned as a target:

  • filling out the form;
  • sending a message to e-mail;
  • viewing a page or section;
  • purchase;
  • review;
  • booking;
  • working with a filter and so on.

When a user takes a targeted action, Analytics captures this and saves it as a conversion.

They, in fact, filter: you can exclude traffic from specific IPs, you can configure receiving data from one of several directories, and much more. Separately, we note that filters can be configured to convert URLs of dynamic pages to text strings.

The filters you create are in views, but they work at the highest level - the account level. This means that if an existing filter changes, it will change for all account views. To avoid this, you need to create a new filter, and not change the old one.


Most importantly, you cannot do all views with filters, leave at least one without them. This is necessary to save complete data: if a filter is set, Analytics will process only the part of the data limited by this filter. If all views have filters, complete data will be lost.

An event in GA is any user interaction with content that can be captured regardless of article or screen views. That is, an event can be anything at all. Events can be used to track the behavior of button actions that do not change the URL when clicked.

Many events (downloads, button clicks, clicking on a link, playing videos) can replace goals.

Events are hidden in the "Behavior" section:


Events are harder to set up than targets because they require code to work. Therefore, this work is usually entrusted to programmers or webmasters.

The event consists of 4 components: the first two are required, the remaining two are recommended:

  • category - the type of content or activity;
  • action - what the user should do with it;
  • label - any additional information;
  • value - a quantitative value, that is, any numerical characteristic: the number of downloads, objects on the page, video viewing time, and the like.

For example, we set the event to 10 downloads of the pdf file. Hence,

Then the code is compiled:

"ga (" send "," event "," Files "," Loaded "," Chapter from book "," 10 ");"

The code needs to be inserted into the script of the desired action, in our case it is a file download.

This example is a fairly primitive event in terms of settings: for example, setting up events for videos is more difficult, you need to know a lot of tracking parameters and be able to work with code. But this, of course, is the topic of a more advanced article on GA settings, but for now you can read more in Google Help.

Reports

Of course, the main reason for starting a Google counter for a site at all is the ability to get data about traffic and user interest in the site. Such data is found in reports. Let's see what useful reports are from an SEO point of view.

  • Traffic Sources → All Traffic → Channels


This report shows where users come to the site from:


On the left, in the Default Channel Grouping column, the rating of traffic sources is collected, where it comes from:

  1. Organic Search - organic search results (the most important metric for SEO).
  2. Direct - direct traffic (users enter the website address in the address bar).
  3. Referral - referrals from other sites.
  4. Affiliates - traffic from partner sites.
  5. Social - referrals from the social network.
  6. Display - traffic from display or banner ads.
  7. Paid Search - traffic from paid ads.
  8. Email - referrals from email campaigns.
  9. Other Advertising - other traffic with UTM tags.

Click on Organic Search:


The first in the "Keyword" column are not provided and not set. What it is?

Not provided - These are the keywords that the user requested from Google using a secure connection, that is, there was an SSL certificate and the request was encrypted. For Google, there is generally no option to show such requests to site owners, because the company protects personal data.

Not set - there is no data for these requests. There can be many reasons: traffic from the Display Network (Google Display Network - sites where Ads are displayed) is not related to requests; Campaigns are manually tagged, and the report collects only those automatically added; Invalid clicks registered. Keys from other search engines (for example, Yandex) will also get here if filtering for this source is not configured. In general, Google found some kind of error and the request went to this category.

In this article, you will learn how the Google Analytics code works, how to install it on your site, and what to consider when doing so.

What is tracking code

The Google Analytics tracking code is a piece of JavaScript that collects and sends data about unique page visits to Google Analytics.

To activate its work, you need to insert a part of the code before the closing tag into the site page template. and replace UA-XXXXX-X with ID.

Where to place your Google tracking code

Of course, the tracking code executes the function anywhere on the page. Another question is how well he does it.

Asynchronous codes should be placed at the top of the tag , before any other script and CSS tags. This way the script is loaded once, then saved in the cache (saved to the computer, and there is no need to download it again), which speeds up the process.

What codes are currently supported by Google Analytics

The ga.js code is currently (since 2014) deprecated, it is not recommended to use it. Choose analytics.js (Universal Analytics) or gtag.js. The first is more popular, and gtag.js is a completely new approach to data collection (more on this later in the article).

If you are using gtag, you do not need to install the Universal Analytics code.

How to find out which Google Analytics library is on your site

See what is loaded in the code.

Or call the developer's console and look at the loaded scripts.js on the "Network" tab.


How analytics.js code works

The standard code snippet looks like this:


Its main tasks are as follows:

  • Creates an item