Google Analytics where is the counter code. Registering with Google Analytics and running the tracking code


Getting the meter code Google Analytics

To install a meter, you need to obtain a meter code. To do this, follow the special link in Google, then you need to log in to the system (if you are already registered in Google system, click "Login") or register.

Picture 1.

After registration, you will receive an email with a verification link. You need to confirm your registration, then log in to the system. An authorization window will open. You need to click on the "Registration" button.


Figure 2.

The counter settings window will open. You need to enter the name of the counter (will be displayed in the general list of counters), URL address of the site, select the industry, time zone. You also need to enter the name of your account in the service. Then click the "Get Tracking ID" button. A Terms of Use Agreement pop-up window will appear, click "I Accept".


Figure 3.

A page with the counter code will open. Here, if you wish, you can make additional settings counter. After that, click "Save". On this page you will see the species tracking ID number: UA-12345678-1. This number will need to be copied and pasted into the “Google Analytics Account” field in the administrative part of your online store.


Figure 4.

To insert an ID number on an online store website to track traffic, you need to go to the administrative part. Then select “Settings - SEO and counters” from the menu. Select the "Google Analytics" tab. At the top you will see the “Google Analytics” block. Here you need to check the “Enable” box and copy your tracking ID into the “Google Analytics Account” field.

Attention!

In the field you need to copy only numbers without the letters "UA".


Figure 5.

Information about traffic to your site will be available in your account on the Google side. You need to log in, then select the desired site from the list, then go to view statistics. Information about site traffic will be available 2-4 hours after installing the counter on the site.


Figure 6.

Setting goals

To start setting up Google Analytics goals, log in to personal account Google Analytics.

Let's look at options for setting up a goal of the "Event" type, using events available from the store settings.

Goals are set at the presentation level; to do this, go to the “Administrator” tab, then click “View Settings” (Fig. 7).


Figure 7.


Figure 8.

Click add target (Fig. 9).


Figure 9.

After which a window opens where you can choose from a template or create your own goal, we choose to create your own goal, then you need to fill out a description of the goal: the name of the goal and its type (Fig. 10).


Figure 10.

The value in the "Action" field must be selected from the list of reserved actions in the store settings. To view the list of actions (events), go to the “Settings - SEO and counters” menu item in the site administration panel, then the “Google Analytics” tab (Fig. 12).

Select the action for the goal in accordance with the list of available events on the “Google Analytics” tab (Fig. 12).


Figure 11.

And in the list of goals we see the goal we just added (Fig. 13).


Figure 13.

Target setup is complete.

Second lesson on learning Google Analytics called “Installing the Code” Google tracking Analytics” In this lesson you will learn:

  • where to add the Google Analytics tracking code;
  • what website settings will need to be changed;
  • How to check the installation is correct.
Three simple steps to get started with Google Analytics. First: register for a Google Analytics account. Second: install the appropriate code on all pages of your site. Third: if you use Google AdWords, link it to your Google Analytics account to get cost and click data. To find the ID and fragment, follow these steps:
  • Sign in to your Google Analytics account.
  • Open the Administrator tab.
  • From the drop-down menu in the ACCOUNT column, select an account.
  • From the drop-down menu in the RESOURCE column, select a resource.
  • In the RESOURCE section, select Tracking > Tracking Code.
There are two ways in which you can register for a Google Analytics account. You can go to google.com/analytics and click on the “Sign up now” link. Also an AdWords user, you can create new account via “Google Analytics” under Reports.

Google Analytics uses a combination of JavaScript and first-party cookies to collect anonymous data about your visitors. Once you create your Google Analytics account, you will be provided with a tracking code. You will need to install this code on all pages of the site. If you later need to access your tracking code, click on the “Admin” icon in the top right corner of the screen. On the Administration page, you can see a table with a list of accounts to which you have access. Click on the account of the web resource that interests you. You will see a table with web resources for this account. Click on the desired web resource. On the next page, click “Tracking Info”. You can grab an asynchronous version of the tracking code from this page. The asynchronous version of the tracking code will allow your site to run faster, so we recommend always using this version. During this course we use asynchronous code every time we show tracking technology. Let's look at the tracking code.
This section in the code tells Google Analytics which account owns this traffic. The number immediately after “UA -” is your unique GA account number. The number following the last dash is a personal index. This section of the tracking code automatically identifies secure and unsecured pages. Therefore, you can use the same code on https and http pages. The tracking code that is provided to you is designed to work with all types of sites. In some cases, however, you will have to do small updates in the tracking code on each of your pages. For example, if you need to: * Track multiple domains in one profile. * Track multiple subdomains per profile * Track multiple domain mirrors - you should watch a separate tutorial on tracking domains and subdomains One of the main benefits of asynchronous code is that you can place it at the top of the page. This increases the likelihood that the tracking code portion will be sent before the user navigates away from the page. It is recommended that you place your JavaScript code in the . If you buy keywords on Google AdWords, you can use Google Analytics to see how effectively your paid keywords are impacting conversions, revenue, and ROI. You can compare search result positions for each keyword, and you can compare the effectiveness of your ads. To do this, you need to link AdWords to your Google Analytics account. Google's Urchin software is similar to Google Analytics, but Urchin runs on own servers, while Google Analytics is a service of Google. If you have Urchin licenses, you can run Urchin and Google Analytics together on your site. This will give you greater flexibility and analysis capabilities. Once the tracking code is set, it typically takes about 24 hours for the data to appear in your reports.
You can also view source pages to make sure the tracking code is installed.

Experienced webmasters know that the well-being of any Internet project largely depends on the timely collection of data, as well as its further processing.

To do this, you should install Google Analytics. A free and easy-to-use tool allows the site administrator to obtain accurate information about visitor actions and conversions.

Thanks to analytics you will learn:

  • how the design change affected visitor behavior;
  • where most of the users come to the site from;
  • does advertising bring the expected results;
  • which pages are the most visited.

Do you want to save time and right now learn how to correctly create and configure the Google Analytics counter code and add it to your website? Then this article will definitely be useful for you!

Step-by-step instructions: from, a to z

To use the service you must complete simple steps: register with Google Analytics and place the tracking code on your blog pages, after which you can move on to studying the behavior of your audience.

Registering with Google and creating a counter

The “Resource Settings” tab also makes it possible to connect many useful tools. For example, by interacting with an AdWords profile, the analyzer will begin to accumulate information about user behavior after an impression or click. This means that you will know exactly what share of traffic was brought by AdWords, and you will be able to optimize the page and ad if necessary.

Required changes in the Presentation section

In this tab you can create 25 sets of reports, each of which will have its own segments, accesses and alerts.

  • View Settings

Here the account owner must specify the appropriate currency - it will subsequently be displayed in reports. If you want to install the Google Analytics counter code to obtain the most accurate data, use robot filtering - the mentioned option will exclude spiders and search bots from accessing the site from statistics.

  • user management

Are several specialists working on optimizing your project? Add them to the list and grant permission at the level you think is necessary (from viewing and analysis, to sharing and the ability to make changes to accounts, reports and filters).

  • Goals

Thanks to this tab, you can accumulate data on conversion events and goals. Templates with a customized configuration are focused on assessing traffic sources, embedded requests, interactions and income, that is, placing an order on the site. Additionally, you can customize your own goal. Immediately after installation, the user is prompted to enter a description and details about the goal - all this will become the basis for analyzing effectiveness.

  • Content Groups

They will be useful for those who want to combine specific materials or group pages according to certain criteria: extracts, tracking code and specified rules.

  • Filters

They make it possible to change and also narrow the collection of information. There are built-in tools for including (excluding) traffic from an IP address, from the provider's domain, to a specific host and to specific subdirectories.

  • Channel settings

In the “Channel Group” subsection you can easily change referral channels, and in the next category you can divide traffic sources into regular and branded ones, that is, requests with the company name. This way you can study the ROI of different keywords to improve your campaign.

  • Ecommerce Settings

Extremely useful feature for online stores, providing reports on related products and customer behavior at each stage of the transaction.

Important! Changing the settings affects the counter code; it is for this reason that it is better to configure web analytics for yourself in advance. After changing some settings, you may need to add new version counter code for the site.

How to install Google Analytics on a website?

Copy the tracking code and place it on all pages of the resource or in the file responsible for generating templates for all pages (in the footer or header after the tag).

Three ways to add a counter to a website

  • Manually via FTP

Everything is extremely simple: go to the server and find the file in which the tags are displayed, add the code immediately below it. Often this file is called Header. php (example for WordPress).

  • Using a plugin

Exists a large number of extensions for different engines (for example, Google Analytics WordPress), the installation of which takes a matter of seconds. All you have to do is copy the script to the plugin settings page - and you're done!

  • Via Google Tag Manager

Go to the site https://www.google.com/analytics/tag-manager/ and add a new account and click Next. Then specify the name of the container and the location where the analyzer will be used (this could be AMP, website, iOS or Android). Click on the “Create” function and the agreement for using the tag manager will open. For convenience, you can select Russian in the drop-down menu at the top.

All you have to do is agree to the company’s terms, and immediately after that both code fragments will appear: the first must be inserted on the site in the section as close to the beginning as possible, and the second after the opening tag.

Having dealt with the tag manager, we move on to installing the counter. The easiest way is to import the container through administration and then replace the identifier in the “Value” field with your own analogue.

How to check that the informer is working?

Make sure correct setting web analytics is easy: after adding a Google Analytics counter to your website, go to your service account. Select the “Reports” tab, and then “Real-time”, then go to your resource in the second tab.

If the report displays information about one visitor, it means there are no errors and you have completed the task!

For the same purpose you can use special extension for the browser.

Google Installation Analytics for different CMS
  • WordPress

To integrate the script, just go to the administrative panel, and then select “ Appearance" and "Editor". Find the template file you need and paste the counter code after the opening header tag. php. Opencart
Go to the “Add-ons” section by selecting the “Analytics” subcategory. After that, click on the icon next to the name of the tracking system and add the resulting script there.

  • Joomla

In the admin panel, select “Extensions” and go to “Template Manager”. By checking the box next to the desired option, click "Edit HTML". This is where you need to place the code.

  • "Bitrix"
  • MODx

The owner of a site on this engine must go to the “Elements” section, then to “Element Management”, “Templates”. Next, you need to open each template in turn and insert the counter code there. More convenient solution- adding a script to header chunks.

Let's sum it up

The time spent on installing Google Analytics is fully compensated by the ability to conveniently track site visit statistics.

Good day to blog readers. Do you have a blog? Visitors come to you, but you don’t know how to install a visit tracking system? Then this lesson will help you 100 percent. Counter for the site: google analytics and yandex metrics - the topic of today's lesson.

After installing the counters from this lesson, you will have access to information on resource visits, on visitor transitions, and you will also be able to track where your readers come from and where they go. Yes today search engines and it is tracked.

Well, let's start installing new ones. additional elements who will become indispensable assistants.

Not a big outline of the article for this post:

Yandex Metrica

Google analytics

Installing Yandex Metrics

Let's move on to installing a widget that will count the number of visitors. And so, the first thing you need to do is go to Yandex to get the code to install the counter. To do this, click on the address metrika.yandex.ru. After the transition, you need to activate the account that we created in the lesson called.

If you haven't created an account yet, you need to take care of it.

Click on the image to enlarge to see what to enter in the fields. After entering the domain, click the CREATE button.

In order to install the tracking script, go to www.google.com/analytics. Now we log into your account, after which we register your project.

If you don't have a Google account, it's time to worry about creating one. You can do this step by step in the lesson.

After logging into Google, we see this window; it will appear if you have never encountered this system. If sites were registered on the account, then you will not see requests for registration.

Since we are registering for the first time, we get a window in which we click the registration button. This will take a couple of minutes, so don't worry about wasting time.

Have you started registering? great, time to write the data. In the first window, select a website - this will be selected as standard. Account name, write the name you want, after - the name of the site, in the next paragraph we enter the site from which the information will be tracked.

After filling out all the information, go down to the very bottom and click the appropriate button to complete registration. Next - agree to the terms of the system, and after that we get to the data page, where we will take the tracking code.

In this window you can view your account details and see all the services that are offered. In order to find the tracking code, select the TRACKING CODE item, as in the screenshot. Copied? Great. Now you need to paste it on your blog.

To insert analytics from google you need to do exactly the same steps as you did for Yandex systems. Widgets - text and select a location. You don’t have to think about the location, place it anywhere, analytics from Google are invisible, they don’t show up, this code is a tracking script. View all visit data on the analytics website.

Bottom line

After all the steps taken, you have two most powerful tool for working with information about visitors. Using tracking services, you can see the number of people, the number of views; on analytics sites you can see what transitions were within the project, what pages they visited, where they went and where they came to you from.

It's time to finish the article for today. I hope you have installed your meters. If you have any questions, please ask them in the comments.

By the way, there is a competition on the blog for the best commentator; at the end of this event, the winners receive prizes, three lucky ones, whose names we will find out on the last day of the month.

Subscribe to blog updates so as not to miss new lessons and new information on the topic of the blog. After subscribing, please confirm your subscription in an email that will contain a link to activate your subscription.

Thank you for your attention.

Sincerely, S. Vasiliev

Lastly, by tradition, a short video - How roads are cleaned in Canada.

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 Google Analytics data collection servers.

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 JavaScript procedure _trackPageview. 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 the 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.







2024 gtavrl.ru.