Setting goals in Yandex.Metrica is a necessary step when launching an advertising campaign in Yandex.Direct. Accurate goal setting helps you track your conversion and customize your retargeting. Ignoring an important point in the formation of an advertising campaign, the owners run the risk of missing a huge part of potential customers and "draining" the entire advertising budget. Tracking goals will help you avoid failure and increase conversion.
What is a Yandex.Metrica counter and how to install it on a site
The Yandex.Metrica counter is a program code that is embedded in web pages. "Metric" consists of two parts: a counter and a database. When users perform any actions on the pages of the site (login, clicks, clicks, etc.), the counter code is executed and transmits to the "Metric" information about the web page and the actions of visitors.
Setting a goal in Yandex.Metrica begins with creating, configuring, and installing a counter on a site.
- Open Yandex, register and log in to your account.
- Go to the "Metric".
- Click the Add Counter button.
- Enter the friendly name of the counter (for example, the name of the store).
- Indicate the address of the site where it will be installed (or the full path to the page: my_syte.ru or my_site.ru/sale).
- Set the “Timeout” of the visit (the number of minutes of user inactivity on the site until the session ends.
- For example, 30 minutes is indicated. If the user does not do anything for half an hour, then the session will end and new actions will be recorded in another session.
- Accept the user agreement by checking the box and click "Create counter."
Setting goals in Yandex.Metric requires the installation of a counter code on the site. For this:
- Click "Settings" (gear).
- Select the “Counter Code” tab.
- Check the boxes for "Webvisor, ..." and "Asynchronous Code". In total, 8 counter code parameters are available. The first analyzes the actions of visitors, the second makes the code “easier”.
- Copy the counter code below and add it to the HTML code.
Tip:
set the counter in front of the closing
tag / head on all pages to record all visits to the site. At this stage, the counter is created, the initial settings are completed, the code is installed on all pages of the site. Now the activity of visitors will be displayed in the Metrika service.
Setting goals in Yandex.Metrica
Each advertising campaign should lead the user to a certain result, which is called the goal.
There are two types:
- Conversion - monitor the effectiveness of the advertising campaign and conversion, help analyze the activities of the audience on the site.
- Retargeting - help to configure the display of advertisements to visitors to the site who previously performed any actions on it.
Setup goals are divided into:
Simple - involve performing one step, the goal is achieved with just one, for example, by clicking on a button.
Setting goals in Yandex.Metrica of a simple type consists of 5 main steps:
- Click the Add Target button.
- Give a clear name for the goal.
- Indicate the type of condition.
- Set the condition parameter.
- Click Add Target.
The created target will be visible in the panel where the number, name, description and ID are displayed.
Goal: View Count
This goal will be achieved when the visitor views the specified number of pages. To configure, add the number of pages that the site guest should see in the “View” condition. Almost not used in online stores and single-page. However, it can be used to study user behavior.
Purpose: visit pages
An achievement is the transition to a specific page (inside the site, from an ad unit, even downloading a file). Setting a goal in Yandex.Metrica is done by adding a partial or full page URL and has several conditions:
- URL: contains. Part of the address is indicated here. The goal was achieved by clicking on the link containing this part.
- URL: match. It is necessary to indicate the full address of the page to be visited in order for the goal to be achieved.
- URL: begins. Only the initial part of the link is entered, suitable for those cases when a group of pages is tracked, for example, my_site.ru/catalog.
- URL: regular expression. In this case, it is not the address that is specified, but the regular expression containing the URL. For example, used for SEO analytics. Setting a goal in Yandex.Metrica with a regular expression requires careful study, and you cannot tell in one paragraph what it is and how to use it correctly.
Visiting pages is one of the most accurate goals that triggers and records the conversion only when the visitor actually clicked on the page.
Goal: JavaScript event
The goal here is to execute a code, for example, clicking a button, sending a request through a form, and so on. The complexity of the setup is that, in addition to creating a goal in the "Metric", you need to add an event code to the site on the desired element. In simple words, it looks like this: first, the element code is triggered, causing an event that the counter passes to the "Metric".
Setting the “Event” goal in Yandex.Metrica is related to editing the code of a web page. A new goal is created for each element, in which a unique identifier is set. It is mentioned on the site once in the event code.
Setup is performed in four steps:
- Add a new JavaScript event target.
- Please provide a unique identifier for the goal.
- Save the settings.
- Paste the event code into the HTML code of the page that is responsible for the desired element.
If the event code and identifier are inserted correctly, then after a while statistics will begin to be collected.
The most striking example of use is button tracking, which captures Yandex. Metrics". The setting of the “Button Press” goal is carried out according to the general principle.
- Create a JavaScript event target.
- Specify a Click Target ID.
- Open the HTML code of the page where the button is located.
- Find the code responsible for the operation of the button.
- Add the event code there:
Compound Goal
When setting up a composite goal, you can create from 1 to 5 steps, which helps to track the specific path of the site visitor. For example, you can consider the passage from the catalog to the product card:
- Create a composite goal.
- Enter the name of the first step ("Directory").
- Indicate the condition - URL: contains - and enter the / Catalog link.
- Click "Add Step" and enter the name of the next step ("Category").
- Specify a URL condition.
- Repeat for the third step “Product” and click “Publish”.
Setting goals in Yandex.Metrica for a one-page
The main task of the landing is to increase conversion and increase traffic. Here you need to track any actions of visitors on the site: logging in, viewing, clicking on buttons, sending an application, therefore competent setting of goals in Yandex.Metrica is important. "Submitting a form" is the main goal for a one-page, so it must be considered in detail.
- Create a goal with a condition type of JavaScript event.
- Specify a unique identifier "ANKETA".
- Add the onsubmit event to the page code that is responsible for submitting the form:
Tracking Yandex.Metrics via Google Tag Manager
It’s convenient to use all available promotion and analytics tools when they are located in one place. Therefore, it is worth considering the question of how goals are set in Yandex.Metrica via GTM.
The first step is to add the counter code to GTM:
- Open GTM, go to "Tags" and click the "Create" button.
- Fill in the name at the top and select “Custom HTML tag” at the bottom.
- In the HTML field, paste the copied code of the Yandex.Metrica counter.
- In the "Activation Terms" select "All Pages".
- Click the Publish button.
At this stage, setting up the Yandex.Metrica code using Google Tag Manager is completed. Now you need to configure the recording of events on the pages of the site and the transfer of data to the "Metric".
For example, configure the form submission commit:
- Create an additional tag, specify the type "Custom HTML tag".
- In the HTML field, enter the code:
- Under activation conditions, specify the “Form” trigger.
- In the trigger settings, specify the conditions corresponding to the parameters on the site.
- Click the Publish button.
Using the capabilities of Google Tag Manager allows you to configure goals "Event" without making changes to the source code of the pages. This is a safer way. It is convenient when the source code of the site is unavailable.
Total
Setting goals in Yandex.Metrica requires an understanding of exactly what goals the site is pursuing and what statistics are needed. It helps to track the effectiveness of advertising, it is easier to control the budget with it. In addition, the setting displays which campaigns should be invested and which increase the conversion. Visual demonstration of indicators in the reports forms a clear picture of user behavior. Goals in Metric can be used to set retargeting in Yandex.Direct. This will increase the conversion with already trained visitors and increase brand awareness.