How to make Google Analytics counter visible. Installing Google Analytics

In this article I will talk about how to properly produce basic installation Google Analytics code to your website. If you already have this web analytics system installed, do not rush to close the page; it is quite possible that you will discover something new in this article. The fact is that it’s not in vain that the title says about setting up for Runet. It is when working in RuNet that the basic GA package has one limitation, which you can find out about only by digging deep into reference materials. No one will tell you about this during registration. Wherein, this limitation significantly affects the quality of the data obtained.

In this article you will learn what this limitation is, and most importantly, how to get around it. I have seen many sites on RuNet with installed system Google Analytics, and only a few had the html code correctly configured for Runet. And the Internet agency NextMedia even conducted a study on this topic and came to the conclusion that in RuNet only every tenth site using Google Analytics configures it correctly for full data collection.

Now, when registering a new account in Google Analytics, the system displays new version html code for inserting into the site, the so-called asynchronous code . Its essence is that it can be loaded in parallel with the loading of the main content of the page, thereby not slowing it down. At the same time, on this moment, many Google users Analytics installed previous version code (ga.js). Therefore, in this article I will show my recommendations for setting up GA using the example of both versions of the code: asynchronous and regular.

Summary:
1) Register an account in Google Analytics and receive the html code
2) Setting up a site profile in your account
3) Refinement of the html code (setting up for Runet and Ukraine, tracking subdomains)
4) Installing html code on the site + separate instructions for PHP sites and blogs on WordPress, Blogger and Joomla.
So, let's begin:

Registering an account in Google Analytics and receiving the html code

If you already have an account in any of Google services(GMail, AdWords, Adsense, etc.), then you do not have to register again. Only if you don't want to have separate account for Google Analytics.

To register a new account or log in, go here:

Tell your friends about this, in case they find it useful.

In order to install the google analytics counter, you need to provide all pages of your site with the so-called tracking code - GATC (Google Analytics Tracking Code).

GATC (aka google analytics counter) is a fragment JavaScript code a, which we insert on all pages of the site. Essentially, it works as a beacon to collect information about visitors and forward it to collection servers Google data Analytics.

Google analytics code

Typical google code analytics (GATC) looks like this:


var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-ХХХХ-ХХ’]);

(function() (
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
})();

This is a sample code that Google automatically suggests, consisting of 3 parts:

  • Unique account identifier in the format UA-XXXX-XX. It is important here not to enter another number by mistake, as you can transfer valuable data to someone else’s account.
  • Calling the _trackPageview JavaScript procedure. This is the main procedure in Google Analytics that collects URL addresses page views that visitors load into their browsers, as well as parameters such as browser type, language setting, referral source, and timestamp.
  • Calling the main JavaScript file from Google servers. Most important file- this is ga.js, contains the JavaScript code necessary to collect data. This file is used for everyone Google accounts Analytics.

The Google Analytics counter is an asynchronous code, which means that it loads in parallel with the page. Using asynchronous syntax is possible thanks to the _gag object. It acts as a queue, which is a first-in, first-out data structure that collects API calls until ga.js is ready to execute them. To add something to the queue, use the _gag.push method.

The line “var _gaq = _gaq || ;" creates JavaScript array. If _gag is already defined, the script will continue to use this variable. If not, it creates an array:

Gaq.push([‘_setAccount’, ‘UA-ХХХХ-ХХ’]);
_gaq.push([‘_trackPageview’]);

When the ga.js file is loaded, two commands are pushed (queued) into the array. The first one sets the account ID in which your data will be stored. The second intercepts the URL of the page to be loaded. Once ga.js has finished loading, it replaces the array with a _gag object and executes all queued commands. Subsequent calls to _gag.push are resolved by this function, which executes commands as they arrive.

Installing Google Analytics

Often many people do not know how to install Google Analytics. It turns out that everything is simple - you need to install the Google Analytics counter before the closing tag.

This improves tracking accuracy since the ga.js file will be loaded first. After installing the counter, the data in your account should begin to be displayed no later than 4 hours later. But in the case of a new account, this may take up to 24 hours.

SHARE

What is Google Analytics for and how to set it up? How does Internet marketing work on the Internet?

A person is looking for something on the Internet, some information. For example, in Google he types the request: “Where can I buy a fur coat made of deer in Moscow time?” (Humanists will forgive me for the example), then search results gives him options for sites that sell deer fur coats in Moscow, he clicks on the link and gets to the site. All the first stage is completed and this first stage is called traffic.

Correctly with the help of Internet analytics, a couple of days ago I wrote a guide article on how to set up Yandex Metrics 2.0, and today I’ll tell you in detail about how to set up Google Analytics correctly, I’ll describe the process of creating goals, and why they are needed.

Let's move on to our topic

Creating a Google Analytics web analytics counter

In order to install the counter, you need to get its code in google panels analytics. Before you create an account in Google Analytics, I’ll say right away that for 1 Google account you can create and place up to 100 analytics accounts for tracking.

We need to fill in only 5 fields and leave all the checkboxes enabled.

  • The name of the account itself (since Google offers a convenient hierarchy, here I usually create an account for a company, client or corporate sites)
  • Enter the name of the resource itself (it’s brief here, but it’s clear what kind of resource it is, so as not to get confused later)
  • Enter your site URL
  • Set the industry for statistics (if you don’t know what, put something else...)
  • Specify your time zone so that the analyst calculates the data correctly
  • Install Google script Analytics to the site

    ga("require", "displayfeatures");

    You need to insert it between two other lines. You need to copy the code to any text editor(notepad, Word...)

    You should end up with code like this:

    Setting up google analytics for WIX

    Watch a short video about how to insert code into a website using the Wix platform. It’s easy and my comments are not needed here.

    Selecting and setting up goals in Google Analytics

    Very great amount The people I interviewed (clients) set up a counter, both Google and Yandex metrics. But apparently they don’t quite understand why they need this counter, because the vast majority do not have goals set up.

    Do you know why?

    Because there is no place for statistics in their business. But those of my clients who found out what IMPORTANT information They give metrics and begin to regret what they did not do earlier. So, one of my clients, the managing partner of the clinic, a Tibetan doctor, Sayan Radnaev, once said, I quote:

    Ivan, after you opened my eyes to analytics, now I understand what a hell of a lot of money I wasted just like that in 2006.

    So, let's start setting up goals in Google Analytics.

    To do this, go to the interface of the already registered account and the created counter. We choose goals.

    “Add target” button

    But before we continue, I must mention to you the concept of “conversion”. What is this concept?

    To explain it simply in two words, conversion is the achievement of a goal. Let's look at an example:

    We have a website and a client, let’s say rulesremonta.ru. Every day people from contextual advertising in the amount of 200 people, only 15 people leave an application, it turns out that our conversion is 7.5%. How would we understand this without having set goals?

    Now that it’s more or less clear, let’s continue with the setup...

    In total, the setup is divided into 3 steps:

  • Description of the goal
  • Target Details
  • Let's proceed to the first step - Before us is a page for setting goals, there are three settings options:

    • Select and configure a template target
    • Set up a “Smart” goal (not available yet, because we do not have a connection with Google AdWords)
    • Or set up your own

    I always prefer to customize my own, there will be more customization and it can be made more flexible. We choose our option. Click continue.

    In the description of the goal, we give it a name - this will depend on what exactly you will be tracking. For example, incoming call or application. This is important, as a rule there can be many goals, and in order to avoid confusion you need to come up with a unique name for the goal.

    Afterwards we select specific type goals, I will have this as an event - since I need to track the number of incoming calls from clients from the call tracking system.

    How to create a goal description and choose a type

    In the third and final step, we need to enter the event identifier itself, which was set up for us by the call tracking support service from Sipuni.

    If your goal is an application, then you need to select the item “ landing page» in the second step, and in the third enter the address of the thank you page there for your application (purchase).

    How to customize value descriptions for goals

    Setting up retargeting (Big Data)

    The next step is to set up remarketing lists in Google Analytics, it's called that. For what?

    To systematize user data, for example, to separate clients from visitors, and to include catch-up advertising for different target groups. To clear up all our mess, we return to our administrator account, and in the resources column we see the remarketing button, click on it.

    Where to find the remarketing button in Google

    How to choose audiences in Google Analytics

    Great, now we have a goal associated with AdWords, continue setting up, go back to the audience lists and click on the + “audience” button to create another list.

    We also select the view, all the data on the website (it will already be there by default, but check it just in case). Click on users who have achieved the goal. And then we’ll adjust the conditions by clicking on the pencil icon. Let's put the (equal) sign “=” instead of “>”. And we will set the participation period to no more than 10 days. I highly do not recommend chasing users and annoying them for more than 10 days, you will get a portion of negativity)

    List of “they came but didn’t call”

    Similarly, we create a list for those who made a conversion, i.e. called in our case, then we leave the “>0” sign there and advertise an upsell to them, or show loyalty thanks to them for the order.

    Now, our data is becoming not just a bunch of numbers, but is beginning to be segmented for subsequent analysis.

    Linking Google Analytics with AdWords - is it necessary?

    Question: Why do you need to connect these tools with each other?

    I answer: In order to be able to see more detailed reports on your advertising campaigns.

    You are not working with analytics correctly!

    About a year and a half ago, my clients began to see incorrect reports from their sites due to a high failure rate, and I began to look for where the error and jamb were.

    As a result, I realized that the metrics and analytics calculate the percentage of failures differently. I received a solution to this problem on a foreign forum on Google Analytics, where they suggested adding several counters to the existing code additional lines, here they are:
    /* Accurate bounce rate by time */













    if (!document.referrer ||













    document.referrer.split("/").indexOf(location.hostname) ≠ 0)













    setTimeout(function())(













    ga("send", "event", " New visitor", location. pathname);













    }, 15 000);

    After finalizing the code, the failure rates become real and you will be able to see clear statistics.

    How to set up summaries or a convenient dashboard in Google Analytics

    In order to correctly and conveniently read all the analytics, you need to customize several dashboards. Well, for example, this call dashboard was set up for one of my clients to easily read statistics and optimize business processes, as well as draw conclusions about the effectiveness of the website and advertising.

    How to make a dashboard in Google Analytics

    You can also customize it for yourself. Google Analytics is a very flexible analytics tool. Go to the reports tab, then select “summaries” in the left panel and click on the “+new summary” button.

    Where to find the summary in Google Analytics

    Come up with a name for it, for example calls, or requests, perhaps in your own way) and leave “ Blank sheet" Click “Create”.

    First, we need to understand in general the total number of target activations with different channels, in our case this is the number of calls.

    Number of calls tracked

    Then, to make it easier to see the dynamics of calls and conversion by day, we’ll configure the following widget like this:

    Dynamics and conversion by calls (days)

    Well, then, if you wish, you can adjust the dynamics by city (if you have a business operating in several regions), it is also important to make a widget by device in order to see the % of audience calls from mobiles and iPads.

    And of course, the most important thing is that you should make the dynamics channel-by-channel if you have several (at least 2) sources where the traffic comes from. Let's take SEO and Yandex. Direct for example. Then everything depends on your imagination, just don’t overdo it, otherwise you’ll get confused later. You should have a minimum of data that will allow you to objectively look at your business from the outside.

    Google Analytics is very difficult

    Most businessmen and, by the way, marketers also think so because they are not ready to accept and perceive true statistics about their business. But in fact, everything is painfully easy and simple. Businessmen need to hire professionals and not fool themselves. And it is important for professionals to learn and get to know the maximum number of analytical tools, and start helping people increase sales, and not siphon money from clients.

    Conclusion

    In this article, we completely covered the topic of setting up Google Analytics, and also emphasized the importance correct understanding and setting up remarketing lists, set up dashboards for more convenient perception information for both businessmen and marketers and looked at some of the mistakes and errors that may arise on your way when working with the Google counter.

    But I wish your business prosperity if you have a cool and useful product, well, what if after reading this post If you suddenly feel nauseous, this means this information is not for you, don’t bother yourself and turn to professionals!

    You know our number: +7 499 647 93 58 call and we will blow up your sales!

    SHARE

    Subbotin Ivan

    Ivan Subbotin Owner of internet marketing agency SaturDay and leading business consultant with a unique focus on social media. He came to this market with one goal, to raise Russian business from its knees. He uses 10 years of experience in digital, internet marketing and promotion in his arsenal. social media. Stay in touch with me by joining my social media page on Facebook (

    Google Analytics is an advanced tool for analyzing everything that can happen on your website. However, it is somewhat paradoxical: despite all its popularity, Analytics is quite difficult to understand and not everyone knows how to use it correctly. In this article we will look at how to properly configure Google counter Analytics and install it on the site.

    Creating a Google Analytics Counter

    In order to create a new counter, go to Analytics http://google.com/analytics/ using the login in which you are registered in AdWords, if you already have one. If not, just register new account, the main thing is that both advertising and analytics are tied to it.

    In the “Administrator” tab, select “Create Account”.

    If you have several sites, then name the account with some general word; this is relevant if there are several groups of sites, for example, with different topics.

    Next, enter your site URL and select your time zone. The choice of category, although mandatory, is not of fundamental importance. The checkboxes listed below do not need to be unchecked. All you have to do is click on the “Get Tracking ID” button.

    Installing Google Analytics code on the website

    Google offers us to install the generated code on the site:

    It will need to be placed in a tag on every page of your site. If you understand html or the engine on which your site is written, then you will not have any difficulties. Otherwise, contact the developer.

    However, there is no need to rush into placement. Now we are modifying this code so that it can also create lists. The default option is already ready to collect statistics, but by changing it a little at the very beginning, we won’t need to change anything later and won’t need to insert new code elements into the site’s source code.

    To do this, we need to insert a line between the lines ga(‘create and ga(‘send

    ga('require', 'displayfeatures');

    The second modification is to insert the following code at the end of the counter, before the closing tag.

    /* Accurate bounce rate by time */
    if (!document.referrer ||
    document.referrer.split(‘/’).indexOf(location.hostname) != 0)
    setTimeout(function())(
    ga('send', 'event', 'New visitor', location.pathname);
    }, 15000);

    This code serves so that we can accurately determine, since Google initially determines impressions without reference to the time the visitor spent on the site.

    We insert all the resulting code before the closing tag.

    Linking the counter to your AdWords account

    In the admin panel, select “Link to AdWords”

    If you have one AdWords account at the same email address, then you will see it in the offered ones. You need to check the box next to it, select the “All website data” view and link your accounts.

    Now it remains to do a number of manipulations directly in AdWords.

    Click on the gear and go to account settings. In the submenu " Linked accounts“We find the account that we linked two minutes ago, select the “All website data” view and save.

    Setting up goals in Google Analytics

    The counter works better now, but we still don't get all the data we could. In particular, we are interested not only in how many visitors come to our site and how much we pay for it, but in the number of those who completed the conversion actions we need. Now let's set up goals. This is done in the appropriate section.

    In the window that opens, click on the “+Target” button, then select “Custom” and begin setting up.

    There are several options for goals in Analytics:

    • Landing page
    • Duration
    • Pages/screens per session
    • Event

    Now, as an example, let’s look at the goal for visiting specific page. Let's say a customer places an order on the website and lands on a thank you page - spasibo.html. Further settings are simple and look like this:

    The main thing is to write the name of the landing page correctly.

    Setting up remarketing lists

    Finally, let's move on to setting up remarketing lists, which we already took care of earlier. Now in common list All users are included, regardless of what they did on the site. But they can be segmented to be shown later various options advertisements:

    • added an item to your cart but didn't buy it
    • visited only contact page
    • were interested in shares
    • made an order
    • etc.

    The first step is to select “Audiences” in the admin panel at the resource level.

    Click on the “+ Audience” button. Let's go straight to the creation menu new audience and select the settings of the users to whom we will show the remarketing ad.

    The audience can be customized by demographic characteristics, by time elapsed since last visit site (for the so-called), according to the goals they accomplished on the site, etc. The options are limited only by your imagination.

    Total

    That's all. We learned how to create a Google Analytics counter, embed it on a website, link it to AdWords, set up goals, and create audiences for remarketing. This full set for powerful analytics of visitor actions on your website.

    Do not miss:

    Good afternoon, comrades!

    Let's look at setting up counters and goals in Google Analytics (GA). This is definitely most powerful tool on the Internet, without GA, an Internet marketer is not an Internet marketer. Let's begin!

    Analytics will help us analyze effectively. In addition, using this analytics service you can set up an unusual advertising tool - .

    Setting up Google Analytics will not take much of your time and effort. This process is not complicated, it is much more difficult to understand all the buttons and tabs in the interface and learn how to do something else, but with detailed instructions all this will be easy for you. A detailed instructions You can get it in your email by subscribing to the blog!

    Creating an account in Google Analytics.

    Well, let's start by creating an account in Google Analytics. First of all, you need to create an account on Google itself in order to have access to all services, including Analytics:

    Today you learned how to create and install a Google Analytics counter on a website, how to set up goals, and, most importantly, you have a super-cool analytics tool, which we will continue to study in the following lessons.

    See you in touch!

    Previous article
    Next article