Content:
- How to enable integration
- How to set up a tag
- Step 1. Create a tag in Yandex.Metrica
- Step 2. Enter the tag number in the Medflex
- Step 3. Set up goals for the tag in Yandex.Metrica
- Errors when enabling integration
The integration allows you to connect the Yandex.Metrica tag to the online record widgets: A round button, a link to all doctors, and a link to the doctor.
How to enable integration 
- Log in to the section «Магазин интеграций»in your Medflex personal account.
- Select «Яндекс Метрика»in the block «Прочие сервисы»and click «Подробнее».

3. On the page that opens, click «Подключить»at the top right.

How to set up a tag 
Step 1. Create a tag in Yandex.Metrica 
- Go to the page for adding a tag in Yandex.Metrica.
- Specify the tag name. For example,«Виджет на сайте».
- «Адрес сайта»Insert a link to the widget in the line: booking.medflex.ru.
The link is universal for all online recording widgets. You can always copy it in the integration settings in your personal account at Medflex. - Click«Создать счётчик».
- Yandex.Metrica will suggest installing the counter code on the site. There is no need to do this, we have already installed it. Just click «Начать пользоваться»at the bottom of the page.
Step 2. Enter the tag number in the Medflex 
- Copy the tag number on the tab «Мои счётчики»in the Yandex.Metrica dashboard. It's next to the tag name.

2. Go to the integration settings in Medflex: the button «Настроить»on the integration page or the gear icon on the integration card in the integration store.

3. Enter the tag number in the fields:
- "Widget: round button" (for more information about the widget, see the Round Button article)
- "Widget: link to a doctor or link to all doctors" (for more information about widgets, see the articles Link to a doctor and Link to all doctors)
To do this, click on the field Tag number
, paste the copied tag number and click Save the changes.



Important! If you want to track analytics on a widget «Круглая кнопка»and widgets «Ссылка на всех врачей и на врача»separately, create two different counters and specify their numbers in the appropriate fields.
Step 3. Set up goals for the tag in Yandex.Metrica 
- In «Мои счётчики»the tab, click on the tag that you want to configure.
- Go to the section «Цели»in the left menu.
- Click«Добавить цель».
- Specify the name of the goal.
- Select the condition type «JavaScript-событие».
- Insert the event ID from the list below, for example, booking_click. This is the event on the site that you want to track.
- Click«Добавить цель».
List of event IDs:
show_widget — the user has opened the widget.
review_click — click on reviews.
date_change — changing the date of the doctor's schedule.
time_click — a click on the cell with the recording time (branch, doctor, date and time of admission, sometimes specialty is selected).
auth_start - the authorization process has started.
auth_finish_success - the number has been successfully verified.
booking_click — click on the button «Записаться».
close_widget — the widget is closed.
Important! After setting up the counter, the data does not start being transmitted immediately, but within 10-15 minutes. Sometimes there may be a delay of up to 24 hours.
Yandex Help for working with Yandex.Metrica
Errors when enabling integration 
If you have not specified at least one tag number in the integration settings, the status will be displayed. Not configured
.

When you click on an error, a window with its full description will appear.

In order for the integration to work and the error to disappear, specify at least one tag number.