---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com.tr/support/metrica/en/ecommerce/wordpress.md
  - https://yandex.com.tr/support/metrica/es/ecommerce/wordpress.md
  - https://yandex.com.tr/support/metrica/pt/ecommerce/wordpress.md
  - https://yandex.com.tr/support/metrica/ru/ecommerce/wordpress.md
  - https://yandex.com.tr/support/metrica/tr/ecommerce/wordpress.md
  - href: en/ecommerce/wordpress.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: Enabling a WordPress plugin
description: Connecting a WordPress plugin.
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/metrica/en/llms.txt


# Enabling a WordPress plugin

The Yandex Metrica team developed an official free-of-charge plugin for installing a web analytics tag on a website. The plugin runs on WordPress 5.2.9 and higher.

“Yandex Metrica” plugin features:

- Adding new Yandex Metrica tags with the following options enabled by default:
    
    - [E-commerce](https://yandex.com.tr/support/metrica/en/ecommerce/about.md)
    - [Session Replay](https://yandex.com.tr/support/metrica/en/webvisor/info.md)
    - [Click map](https://yandex.com.tr/support/metrica/en/behavior/click-map.md)
    
- Transmitting [E-commerce events](https://yandex.com.tr/support/metrica/en/ecommerce/data.md):
    - Viewing an item profile.
    - Adding an item to the basket.
    - Removing an item from the basket.
    - Making a purchase.
    
- Providing details of [transmitted product data](https://yandex.com.tr/support/metrica/en/ecommerce/data.md#product_data).

To use the E-commerce features, install [WooCommerce](https://en.wordpress.org/plugins/woocommerce/), a plugin for online stores, on your website.

## Getting started {#start}

1. If you don’t have a Yandex Metrica tag yet, [create one](https://yandex.com.tr/support/metrica/en/quick-start.md). Make sure the correct website URL is specified in the tag settings. To check this, go to the Yandex Metrica **Settings** page. Pay attention to the **Address** field value: it should show the URL of the website where you want to install the plugin.
1. <!-- source: en/_includes/ecommerce/enabling/id-enabling/3.md -->
   In the tag settings, enable the **E-commerce** option. A container for collecting data from `dataLayer` will be added to the code snippet by default.
   <!-- endsource: en/_includes/ecommerce/enabling/id-enabling/3.md -->
    
1. Make sure no similar plugin that installs a Yandex Metrica tag is activated in WordPress. To check this, go to the **Plugins** page and search for the plugin with the name “Yandex Metrica”, “Metrica”, or “Metrika”. If you find one, deactivate it.

## Step 1. Install the plugin {#upload}

1. Go to the WordPress admin panel and log in.
1. Go to the **Plugins** page and click the **Add new** button.
    ![](../_assets/wp-add-new.png){.border-yes}
    
1. Add the plugin in one of the following ways:
    
    {% list tabs %}
    
    - By searching for it
    
      Find the plugin named “Yandex Metrica” and click the **Install now** button.
      ![](../_assets/wp-search.png){.border-yes}
    
    - Using a file
    
      [Download a ZIP archive for plugin installation](https://metrika-cms-plugins.s3.yandex.net/wordpress/wp-yandex-metrika.zip). Next, on the **Add Plugins** page, click **Upload Plugin**, choose the ZIP archive, and install it.
      ![](../_assets/wp-upload.png){.border-yes}
    
    {% endlist %}
    
1. Go to the **Plugins** → **Installed Plugins** page and find the Yandex Metrica plugin. Activate it.

## Step 2. Set up the plugin {#set}

1. Go to the **Plugins** → **Installed Plugins** page and find the Yandex Metrica plugin.
1. Open the plugin settings.
1. Enter the number of the tag installed on your website. If the plugin detects a Yandex Metrica tag on the website, the fields will be filled in automatically. Check if their values are correct. [How to find the tag number](https://yandex.com.tr/support/metrica/en/general/tag-id.md)
1. By default, the **Session Replay** option is enabled. It [records user sessions](https://yandex.com.tr/support/metrica/en/webvisor/info.md) so that you can analyze statistics in more detail. If necessary, you can disable Session Replay at any time.
1. Enter the **Brand type** so that information about your product brands will transmit correctly to Yandex Metrica and appear in reports.
    - **Term** — In the **Taxonomy or custom field of brand** field, specify the brand taxonomy.
    
      {% cut "How to find out the brand taxonomy" %}
    
      In WordPress, go to the **Products** → **Brands** page and take a look at the URL in the browser address bar — the `taxonomy` parameter contains the brand taxonomy name. In the example, it's `example-brand`.
      ![](../_assets/wp-tax.png){.border-yes}
    
    
      {% endcut %}
    
    - **Custom field** — In the **Taxonomy or custom field of brand** field, specify the name of the brand field.
    
      {% cut "How to find out the custom brand field" %}
    
      The field can be set using a plugin that is responsible for the functionality of brands on the site. If there is one on your site, you can use the plugin documentation or contact the developer’s support service to determine the name of the field.
    
      You can also look up custom brand fields yourself in the database, if the field is provided by your WordPress theme.
    
      {% endcut %}
    
1. Save the changes.
    ![](../_assets/wp-set-counter.png){.border-yes}

After the plugin is installed and set up, check out the error log. If you have any questions, ask them using the [form below](#form) or go to the Yandex Metrica plugin page on WordPress (click **Go to Support Forum**).


{% cut "Viewing common errors" %}


- The WordPress version is obsolete. Check if a new version is available and install it. To do this, open the admin panel and go to the **Dashboard** → **Updates** page.
- The specified brand taxonomy is missing on the website.
- The theme doesn’t have the hook required for the plugin to run.
- The tag number contains characters that are not digits.


{% endcut %}


## Step 3. Check if data is sent {#check}

Check if the following data is sent to Yandex Metrica:

- [E-commerce](https://yandex.com.tr/support/metrica/en/ecommerce/check.md).
- [Site sessions](https://yandex.com.tr/support/metrica/en/general/check-counter.md).

E-commerce data appears in Yandex Metrica a few hours after it is first sent. To view e-commerce reports, go to Yandex Metrica and open **Reports** → **E-commerce**.

[E-commerce reports](https://yandex.com.tr/support/metrica/en/data/e-commerce-reports.md)

Data about sessions and pageviews appears in Yandex Metrica when the first website sessions occur after you install the plugin. To view statistics, go to Yandex Metrica and open **Reports**. For more information about working with reports, see [Setting up and viewing a report](https://yandex.com.tr/support/metrica/en/reports/report-general.md).

## Updating the plugin {#update}

When a new plugin version is available, a message saying that there is a new version is displayed in the WordPress admin panel. You can install an update in one of the following ways:
- Click the link in the message.
- Select the plugin on the **Plugins** → **Installed Plugins** page.
- [Download a ZIP archive with updates](https://metrika-cms-plugins.s3.yandex.net/wordpress/wp-yandex-metrika.zip). Next, on the **Add Plugins** page, click **Upload Plugin**, choose the ZIP archive, and install it.

## Questions and answers {#qanda}


{% cut "Why is the plugin not sending “Product views” events?" %} {#form}

Most likely, the [Colibri](https://wordpress.org/themes/colibri-wp/) theme on the product page lacks the “woocommerce_before_single_product” hook. This hook is necessary for the plugin to function correctly. We recommend adding the hook to the theme.

{% endcut %}

<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com.tr/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
<!-- endsource: en/_includes/buttons/chat-button.md -->

<!-- source: en/_includes/reports/support-button.md -->
<div class="cut-button">

{% cut "Write an email" %}

<!-- source: en/_includes/popup/id-popup/wrong-sup.md -->
Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.
<!-- endsource: en/_includes/popup/id-popup/wrong-sup.md -->

<div style="padding: 15px;
     margin: 10px 0;
     background: #FFFFFF;
     border-radius: 10px;
     border: 1px solid var(--g-color-line-generic);">
  <iframe style="background: #FFFFFF;"
        height="700"
        width="100%"
        frameborder="0"
        src="https://forms.yandex.com.tr/surveys/1705/?&iframe=1&lang=tr">
  </iframe>
</div>

{% endcut %}

</div>



<!-- source: en/_includes/styles/cut-button.md -->

<!-- endsource: en/_includes/styles/cut-button.md -->

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
<!-- endsource: en/_includes/reports/support-button.md -->

<!-- source: en/_includes/footer-links.md -->
- - -

<div class="borderless-table">

#|
||
Useful links

- [Demo tag](https://metrica.yandex.com.tr/r/dashboard?)
- [Add a tag](https://metrica.yandex.com.tr/add/)
- [Free tag setup](https://yandex.com.tr/promo/freeservice/metrica?utm_source=help_metrica_tr&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com.tr/metrika/)
- [Suggest your idea](https://yandex.com.tr/support/metrica/troubleshooting/idea.html)
- [Discuss in Telegram](https://t.me/yandexmetrika)
|
Online training

- [Get a Yandex Metrica certificate](https://yandex.ru/adv/expert/exam/metrika/?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)


- [Take a training course](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

<!-- source: en/_includes/styles/table-style.md -->

<!-- endsource: en/_includes/styles/table-style.md -->
<!-- endsource: en/_includes/footer-links.md -->
