Setting up Google Analytics. Correct setup of Google Analytics


Before creating an account in Google Analytics, let's understand its structure.

An account is an access point to GA, the top level of the hierarchy. One account can contain one or more resources. You can have several accounts, for example, personal and corporate with access for your colleagues.

The resource can be a website, mobile application, or device (such as a kiosk or point-of-sale terminal). When you add a property to your account, GA generates the tracking code needed to collect data on the property.

A view is a collection of data about a resource. A resource can have multiple views, for example:

  • View with all data on the site.
  • A view that only includes sessions with the source being AdWords.
  • A traffic-only view for a subdomain. A domain that is part of a higher-level domain. For example, mail.example.com is a subdomain of example.com, which in turn is a subdomain of.com

The account structure can be schematically depicted as follows:

Now you can proceed to registering with Google Analytics.

Step 1. Create an account 1. Set up the first view

In the admin panel, section “View” - “View Settings”:

  • Set the presentation currency that will be displayed in reports. If you accept multiple currencies, Google Analytics converts them to the presentation currency using the previous day's exchange rate. More details in the help.
  • Enable bot filtering so that their visits to the site do not distort traffic statistics.
  • Enable site search tracking if you want to know what your visitors are looking for. More details in the help.

2. Create additional views

The free version of Google Analytics allows you to set up 25 views. We recommend creating 3 main views to start with:

  • Working. Unlike the first view, this one uses filters to exclude unwanted traffic from reporting (for example, from a home or corporate intranet; an organization's internal private network)
  • UserID. Shows data only from those users who are logged in to your site. Read more about the UserID view in the help.
  • Test. Helps test functionality from test subdomains of the site.

To quickly set up any of these views, go to View - View Settings, select All Website Data and click Copy View. Next, rename it and add filters. Filters help you exclude internal traffic from reports, track activity in a separate directory, track subdomains in separate views, etc.

Let's look at how to exclude internal traffic so that the actions of your employees on the site do not fall into the statistics and do not distort them. To do this, in the “Views” - “Filters” menu, select the required view, click “Add filter” and configure it:

  • Enter a name, for example IP Filter.
  • In the Filter Type field, select Built-in.
  • From the Select Filter Type drop-down menu, select Exclude.
  • In the "Select a source or target" menu, use the "Traffic from IP addresses" option.
  • In the “Select an expression” menu, select the one you need. For example, to exclude one IP address, select “Identical”, exclude a subnet from IP addresses of the form 192.168.0.* - “Starting with”.
  • Enter an IP address or regular expression.

  • Read more about filters in the help.

    3. Add goals

    The goal can be any user action on the site that is beneficial to you. Why set goals? To understand which source, campaign, ad, keyword brought the sale. The right goals provide important information about conversions. Without this information, it is almost impossible to evaluate the effectiveness of your online business and marketing campaigns.

    Goals are divided into 4 types:

    • Landing page. For example, a user visiting the Contact page.
    • Duration. For example, the user was on the support page for more than 15 minutes.
    • Pages/screens per session. For example, the user visited at least 3 pages of the site.
    • Event. Any user action with content on the site. For example, watching a video, filling out a registration form, etc. More details in the help.

    Let's look at an example of how to set up a goal - clicking on the "Subscribe" button to a newsletter. In the “View” - “Goals” menu, click the “+ Goal” button and select the “Custom” template. Then we come up with a name, for example, “Subscribe” and select the goal type “Event”:


    In the goal details, you need to specify its conditions. The first two “Category” and “Action” are required parameters. It is advisable to enter words here that will help you understand what your goal is. For example, the category could be called “Subscription”, and the action would be “Click”.

    The “Label” and “Value” parameters are filled in at your discretion. Labels provide additional information for events, such as the name of the button, video, or file to be downloaded.

    Each visitor's action on the site can be assigned a monetary value. It is calculated individually. For example, 20% of your guests subscribed to your newsletter and made a purchase, and the average transaction amount is 10,000 rubles. This means that the “Subscription” goal can be estimated at 2,000 rubles (that is, 20% of 10,000 rubles). On the other hand, if only 1% of subscriptions lead to sales, you can specify a value of 200 rubles.


    Done - you have set up a goal. Now you need to insert the event code into the code of the button that you are going to track.

    The standard code for setting goals in GA looks like this:
    ga("send", "event", , , , , );

    We filled in only two conditions, so let's simplify the code to this:
    ga("send", "event", , );
    Where:

    • ga("send", "event", ...); - the part that does not change.
    • eventCategory and eventAction are the name of our category and action, respectively.

    As a result, the event code will look like this:
    ga("send", "event", "Subscription", "Click");

    All that remains is to insert this code into the “Subscribe” button code on your website.

    Read more about goals in Google Analytics in the help, and how to create them.

    Resource settings 1. Exclude unwanted traffic sources

    If your site does not have a built-in payment system, the user goes to the payment system site and then returns to you. Google Analytics considers transitions from payment systems to be a new session. To not count two sessions instead of one, add an exception to the menu “Resource” - “Tracking code” - “List of excluded referral sources”.


    2. Create custom parameters and indicators

    If the standard parameters in Google Analytics for reports are not enough for you, you can create your own. For example, brand, category, username, user ID, purchase cost, profit, etc.

    Using custom parameters, you can divide visitors into separate groups and analyze their behavior. This segmentation helps you make the right decisions. For example, you can find out which filters are most often used for a certain product category and remove ineffective ones. Or immediately offer more relevant products using default sorting or filters.

    How do parameters differ from indicators? The parameter is a text value, the indicator is a numeric value. Those. The user's city is a parameter, and the number of page views is an indicator.

    To create a parameter, go to Resource - Custom Definitions - Custom Parameters. Specify the name and level of the parameter:


    After confirming the settings, a code will appear. Embed it in the appropriate place in your site or application's source code:


    Custom metrics are configured in the same way, but you must select:


    We are done with the basic Google Analytics settings. Now let's look at the advanced settings.

    Step 3. Expand your capabilities in Google Analytics View settings 1. Set up e-commerce

    Collect and analyze data on purchases, transactions, average order value, time to purchase, and more with the e-commerce module.

    Go to Views - Ecommerce Settings and confirm the following settings to use the module:



    Now you can compare groups of channels with each other.

    3. Set up alerts

    Notifications help track deviations in key metrics. For example, you can set up an alert if the failure rate per day exceeds 20%, so that you can respond to the problem in a timely manner.

    To do this, go to the menu “View Settings” - “My Alerts” - “New Alert” and configure the alert:


    When the failure rate exceeds 20%, you will receive an email about this.

    Resource settings 1. Link Google Analytics with AdWords

    If you have an AdWords account, link it to Google Analytics. Thanks to this you will be able to:

  • Understand what percentage of traffic and sales comes from AdWords.
  • Get more conversions at lower costs. Importing goals and transactions from GA into AdWords will allow you to optimize your bids using the Conversion Optimizer.
  • Find out what people do after they click on your ad and go to your landing page. Analyze bounce rates When a user viewed only one page or triggered only one event, average session duration, number of pages viewed per session, etc. This data shows how your campaigns are performing and helps you make decisions about budgets and ad copy. For example, using the CTR rating of the number of clicks on an ad divided by the number of impressions and the bounce rate for an ad group, you can understand how well the site meets user expectations. More details in the help.
  • Increase the likelihood of conversion by showing ads to users based on their interests (games, pets, cars, etc.). To do this, create remarketing groups in GA and use them in AdWords for audience targeting (help).
  • To link accounts, go to the “Resource” menu - “Link with Adwords”, select the desired AdWords account and click “Continue”. Select the views you want to import Google AdWords data into. Don't forget to confirm your settings:


    Google sets up UTM tags for AdWords campaigns automatically. Read ours to set up tags for other ad campaigns.

    Now you can evaluate the ROI Return on Investment of AdWords advertising campaigns in Google Analytics, menu “Traffic Sources” - “AdWords”.

    2. We import advertising costs

    If, in addition to AdWords, you use contextual advertising in Yandex and social networks, we recommend importing data on expenses on these sites into Google Analytics.

    What will this give you? The ability to receive data promptly and in one service to analyze advertising costs, calculate income and ROI. In this case, you can analyze both campaigns and individual ads and keywords.

    To import expense data, in the Resource - Import Data menu, create a new data set and select Expense Data:


    Specify the name of the data set and the view where the expenses will be loaded:


    Set the parameters and metrics you want to download. We are interested in the advertising source and channel, as well as the cost of attracting a user. It is better to leave “Summation” in the “Actions upon import” field, otherwise new data will be written instead of existing ones.


    You have defined the structure of your expense data, now you need to import the data into GA. This can be done manually by creating a CSV file for import (more details in the help). However, this process is labor-intensive and will take time to figure out.

    You can save time and avoid mistakes by using a service to automatically download data. How to configure the service is described in the help.

    Now you can combine data from different advertising services. As a result, you will receive reports that show a complete picture of user actions. This will help you make better marketing and business decisions.

    Of course, in this article we have not covered all the capabilities of Google Analytics. However, the described settings will be enough for a convenient and trouble-free start.

    For the most patient (there is so much text to bear!) and the most curious, we have a bonus in store - an example of setting up a custom funnel. Leave your email and we will send you a file with an example of how to find pages, forms and buttons on a website that scare customers away.

    P.S. If we suddenly missed something important, write about it in the comments and we will correct it.

    P.P.S. If you need help setting up web analytics and metrics systems, then you

    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 a tracking code

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

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

    Where to Place 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 downloaded once, then stored in the cache (saved on the computer, and does not need to be downloaded again), which speeds up the process.

    What codes are currently supported by Google Analytics

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

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

    How to Find Out Which Google Analytics Library is on Your Site

    Look at what is loaded in the code.

    Or call the developer console and look at the loaded scripts.js on the “Network” tab.


    How analytics.js code works

    A standard code snippet looks like this:


    Its main tasks are as follows:

    • Creates an element that triggers the asynchronous loading of the analytics.js library from https://www.google-analytics.com/analytics.js;
    • Initiates the global ga function (called the ga() command queue), which allows commands to be scheduled to run once the analytics.js library is fully loaded and ready;
    • Adds to the ga() command queue a command to create a new counter for the resource specified in the "UA-XXXXX-Y" parameter;
    • Adds a command to the ga() command queue to send a pageview type hit to Google Analytics for the current page.

    To transmit events you need to add the following construct:

    This code is downloaded and executed asynchronously on all browsers. However, modern browsers do not support preloading it. There is an alternative asynchronous code for this case:

    Please note that in Internet Explorer 9 and older mobile browsers that do not recognize the async attribute, the script may be loaded synchronously. Therefore, consider the characteristics of your audience.

    Which analytics.js code is better to use - standard or alternative

    Any. The main thing is that your browser supports preloading the first script. The second, as a rule, improves performance in modern browsers.

    How to Track Ecommerce

    There is a special code for it that takes into account the specifics of e-commerce:


    Moreover, to use e-commerce, you need to connect an additional plugin in the code:

    What data does the tracking code receive?

    Every time you visit a site's pages, a hit in the pageview category is sent to Google Analytics. Thanks to this you can find out, for example:

    • How long the user was on the site;
    • How long he spent on each page and in what order he visited them;
    • Which links were clicked (according to the URL of the next pageview type request).

    The script analyzes the initial page, IP address and agent, which also allows you to determine visitor parameters such as:

    • Geographical position;
    • Browser and OS;
    • Screen size and availability of Flash or Java;
    • Referral source.
    How to receive information about additional interactions

    You may need to change the last two lines of the JavaScript tracking snippet (the create and send commands) or add code.

    Do not modify the code that loads the analytics.js library or initiates the ga() command queuing function.

    When you don’t need to place code in the “head” of pages

    There are two exceptions.

    Custom Tracking Variables

    They are always on the page, waiting for the next view or other event.

    A custom variable can be set at the "head" of the document and is activated before Google sends the HTML code. But if the developers built the page differently and you don't want to change anything, you can create a custom variable anywhere. Remove this line from your async code:

    Paste it on any page after you have set the variables. This way the code doesn't interrupt loading, and you can track custom variables in any block on the page.

    Yes, this can reduce the accuracy of the data if the visitor leaves immediately after the page loads.

    Event Tracking

    The second exception is the Event Tracking feature. When an event occurs, the signal goes to the tracking variable. How to take into account “fast” visitors:

    1) Create a variable, set it to 1 (out of 5) in the key space. We call it “Status”. We set the value to “Logged In” - it will not change until the desired event occurs.

    2) Create an event, assign it to the “Custom” group and define the action - “Page Loading”.

    There are two options: the event occurred and the event did not occur.

    For the first one we assign a label, for example 0 (can be any other value convenient for you). We also set the value for the second option (the event did not occur).

    In this article I will talk about how to correctly install the basic Google Analytics code on 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 on the RuNet that the basic GA package has one limitation, which can only be found out by delving thoroughly into the reference materials. No one will tell you about this during registration. At the same time, 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 saw many sites in Runet with Google Analytics installed, 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 produces a new version of the html code for insertion into the site, the so-called asynchronous code. Its essence is that it can load in parallel with the loading of the main content of the page, thereby not slowing it down. At the same time, at the moment, many Google Analytics users have the previous version of the code (ga.js) installed. 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) Installation of 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 need to register again. Only if you don't want to have a 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.

    First steps

    First of all, you need to go to the service itself. It is located along this link. Here you need to log into your account. Of course, if you already have a Google account, then there is no need to register additionally. The advantage of Google services is that all of them can be used with only one Gmail account.

    So, after logging in, Google clearly shows us what to do next. If we talk specifically about installing a counter, then it all comes down to two steps - filling out some information about the site and then placing the code on it.

    Stage 1 – fill out the information

    At the first stage, you will need to fill out a short form. In particular, you must somehow name the account and site for which the counter is installed. These names can be arbitrary, but please indicate the site URL without errors.

    Next, select your industry and time zone. I hope you understand what this is. Oh yes, at the very top you can choose what exactly you want to track. But we, of course, want to monitor the site and nothing else.

    JavaScript. Fast start

    Learn the basics of JavaScript with a hands-on example of how to create a web application.

    We leave all other checkboxes as they are. That's it, now you can press the blue button to get a counter, you also need to accept the agreement with the service.

    Stage 2 – get the code and paste it

    On the next page a code will be generated for you, which you need to copy and paste on all pages. To do this, insert it into the header or footer. It will be even better to go to the basement, because the performance of the script will not deteriorate. You can insert it somewhere between the opening and closing parts of the footer.

    By the way, if after registering a new counter you did not set a code for yourself immediately, then later it can be found in the top menu in the “Administrator” tab. There, click “Tracking Code”. That's all you need to do, although there are some tweaks you can make that will affect the code.

    By the way, it’s very easy to insert code into WordPress; you don’t even need to connect to files via ftp or go to the server control panel. You can edit the required template file, in our case footer.php, directly from the admin panel. To do this, click Appearance – Editor. And find the file you need. Find the closing footer tag in it. You can put our code in front of it, why not?

    What to do next

    At first you will have all zeros, as I did in this case, because I installed the counter just a second ago. Wait a while to see the first results.

    This is how we learned how to add a google counter to a website. It, like the metric, is ideal for analytics and working with this service can generally be studied for a very long time. Compared to the same live internet, which is aimed at ordinary users, there are many more opportunities here.

    In addition, installing a counter from Google will allow you to link site analytics with other company services. For example, with Adsense. This is a very useful link. What do you get from it? By analyzing the number of visits and the topic of your resource, Adsence will be able to tell you the approximate profit from advertising. To do this, link your accounts and wait literally 1 day for the service to receive the necessary traffic information.

    One of the Internet marketing tools is web analytics systems, such as Google Analytics. They allow you to collect detailed statistics of site visits and actions on it.

    Today we will tell you how to create a Google Analytics counter and add it to your website. This step-by-step instruction is basic material for beginners.

    What is Google Analytics and why is it needed?

    Google Analytics is a free web analytics system from Google that tracks user actions on your website. Tracking occurs using a special code that you need to install on your website.

    The system collects data such as search queries that led to your site, pages viewed, entry and exit pages, time on the site, number of bounces, etc. All information is shown in the form of reports in real time.

    Google Analytics, like any analytics system, is needed to analyze the effectiveness of the site as a whole or its individual pages or sections.

    Installing Google Analytics: a detailed guide for beginners

    The first thing to do is go to https://marketingplatform.google.com/about/analytics/ and click “Sign in to Analytics”.

    After logging in, the system will happily inform you that we are only 3 steps away from starting to work with Google Analytics. Click the “Registration” button.

    • account name;
    • Name of the site;
    • enter the website address and indicate the encryption type (http or https);
    • one of the industry options to which your field of activity is closest;
    • country and time zone.

    It is better to choose the time zone in which you and your site are located; if there are several sites and they are all in different time zones, it is still better to use one time zone for convenience.

    Below the account settings, Google offers the use of additional services. Their use is free, so agree and check the boxes. There, you can allow or deny access to Google specialists. Finally, click “Get Tracking ID”.

    Google will ask you to accept the terms of the terms of use agreement, as well as agreement to the privacy policy. Select your country, check the boxes and click “I Accept” at the bottom of the window.

    A new page will open, where we find ourselves in the administrative panel. The first thing we see is the Google Analytics tracking code.

    Installing Google Analytics code on the site

    Now we need to insert the resulting Google Analytics code into the site. To do this, you need to copy and paste it anywhere on the page after the tag . If you have a one-page site, this needs to be done on one page. If the site has many pages and is written in HTML, then this code will have to be inserted on every page.

    If the installation is successful, data about the site will appear for some time.

    How to connect to CMS

    When one of the CMS systems is used to manage the site, the code must also be inserted after the tag , into your theme template. Some themes and templates provide direct integration with Google Analytics. You can also use one of the plugins.

    Google Analytics Plugins for WordPress
    • Google Analytics Dashboard for WP (GADWP);
    • Analytics Cat;
    • Google Analytics for WordPress by MonsterInsights;
    • WP Google Analytics Events.
    Modules for Bitrix
    • Tag Manager module;
    • E-commerce for Yandex.Metrica and Google Analytics.

    Opencart

    To connect Google Analytics to Opencart, in the “Analytics” section of this CMS, you need to place the tracking code in the appropriate section.

    Advanced Google Analytics plugin for Joomla.

    Conclusion

    Well, we’ve figured out how to install Google Analytics on your website in order to collect statistics and track the effectiveness of promotion. In the following publications, we will talk about adding a site to .





    

    2024 gtavrl.ru.