Enabling a WordPress plugin
- Getting started
- Step 1. Installing the plugin
- Step 2. Configuring the plugin
- Step 3. Checking if data is sent
- Updating the 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:
- Transmitting e-commerce events:
- Viewing a product profile.
- Adding an item to the basket.
- Removing an item from the basket.
- Making a purchase.
- Providing details of transmitted product data.
To use the e-commerce features, install WooCommerce, a plugin for online stores, on your website.
- If you don't have a Yandex Metrica tag yet, create one. 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.
- In the tag settings, enable the E-commerce option. A container for collecting data from
dataLayerwill be added to the code snippet by default.
- 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. Installing the plugin
- Go to the WordPress admin panel and log in.
- Open the Plugins page and click Add New.
- Add the plugin in one of the following ways:Find the plugin named “Yandex Metrica” and click Install Now.Download a ZIP archive for plugin installation. Next, on the Add Plugins page, click Upload Plugin, choose the ZIP archive, and install it.
- Go to “Yandex Metrica” plugin. Activate it.and find the
Step 2. Configuring the plugin
- Go to “Yandex Metrica” plugin.and find the
- Open the plugin settings.
- 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
- By default, the Session Replay option is enabled. It records user sessions so that you can analyze statistics in more detail. If necessary, you can disable Session Replay at any time.
- 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.Go to the taxonomy parameter. In the example, it's example-brand.page in WordPress and look at the URL in the browser's address bar: the brand taxonomy is located in the
Custom field: In the Taxonomy or custom field of brand field, specify the name of the 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.
- Save your changes.
After the plugin is installed and set up, check out the error log. If you have any questions, ask them using the form below or go to the Yandex Metrica plugin page on WordPress (click Go to Support Forum).
- The WordPress version is obsolete. Check if a new version is available and install it. To do this, go toin the admin panel.
- 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.
Step 3. Checking if data is sent
E-commerce data appears in Yandex Metrica a few hours after it is first sent. To view the e-commerce reports, in Yandex Metrica, open Learn more about the reports..
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.
Updating the plugin
- Click the link in the message.
- Select the plugin at.
- Download a ZIP archive with updates. Next, on the Add Plugins page, click Upload Plugin, choose the ZIP archive, and install it.