Enabling an OpenCart module
The Yandex Metrica team developed an official free-of-charge module for installing a web analytics tag on a website. The module runs on OpenCart 2.3 and higher.
“Yandex Metrica” module features:
-
Adding new Yandex Metrica tags with the following options enabled by default:
-
Transmitting E-commerce events:
- Adding an item to the basket.
- Viewing an item profile.
- Removing an item from the basket.
- Making a purchase.
-
Providing details of transmitted product data.
Getting started
-
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 module.
-
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. -
Make sure no similar module that installs a Yandex Metrica tag is activated in OpenCart. If there is one, disable or delete it.
Step 1. Install the module
- Download a ZIP archive for plugin installation.
- Go to the OpenCart admin dashboard and log in.
- Go to Extensions -> Installer.
- Click Upload and select the downloaded archive.
- Update the module modifications. To do this, go to Extensions → Modifications, select the Yandex Metrica module, and click the
icon.
- Go to Extensions, select the Analytics filter, and click
next to the “Yandex Metrica” module. The module is installed.
Step 2. Set up the module
- On the Extensions page, select the Analytics filter.
- Click
next to the “Yandex Metrica” module.
- Enter the number of the tag installed on your website. The module can detect a Yandex Metrica tag installed on the website. To find out its number, go to the Metric search tab and click Find metric.
- 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.
- To enable the logging of errors that occur when the module is running, go to the Logging tab and toggle the option to Yes.
- To save your changes, click
.
To disable the module, select the “Disabled” status when editing it.
After the module is installed and set up, look at the error log. If you have any questions, ask them using the form below.
Step 3. Check if data is sent
To check if data is sent to Yandex Metrica:
- For E-commerce data, see Checking E-commerce settings.
- For data about website sessions, see Checking the tag.
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. Learn more about the reports.
Data about sessions and pageviews appears in Yandex Metrica when the first website sessions occur after you install the module. 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 module
When a new module version is available, a message saying that there is a new version is displayed in the OpenCart admin dashboard on the Extensions page (when editing the module).
To install the update, download the latest version of the module, then follow the instructions depending on your OpenCart version:
- Delete the previous version of the modifier. To do this, go to Extensions → Modifications.
- Select “Yandex Metrica”, click
and then
.
- Go to Extensions -> Installer.
- Click Upload and select the downloaded archive.
- Go to Extensions -> Modifications, select the Yandex Metrica module, click
and then
.
- Go to Extensions -> Installer.
- Click Upload and select the downloaded archive.
- Go to Extensions -> Modifications, select the Yandex Metrica module, click
and then
.
Module versions
Below are several current versions of the module. The list is updated as new versions become available.
Questions and answers
No Yandex Metrica tag is found on the website
To resolve the issue:
- Make sure the module is enabled: go to the Extensions page, select the Analytics filter, and find the Yandex Metrica module. If the module is disabled, enable it by switching to edit mode.
- Update modifications. Go to Extensions → Modifications, select the Yandex Metrica module, and click the
icon.
- Check for errors and fix any that are found: go to the Extensions page, select the Analytics filter, and find the "Yandex Metrica" module. In edit mode, open the Logging tab.
How to disable or delete another module that installs a Yandex Metrica tag
If your OpenCart system has another module that installs a Yandex Metrica tag, we recommend disabling or deleting it.
- Go to Extensions → Modifications.
- Search for the module whose name contains “Metrica” or “Metrika”. If there is one, click
next to it and then click
.
- Go to the Extensions page and select the Analytics filter.
- Search for the module whose name contains “Metrica” or “Metrika” and click
next to it.
After installing the Yandex Metrica module, the ability to edit other modules disappeared
If the ability to edit other modules disappears after installing the “Yandex Metrica” module for OpenCart 2.3 and higher, follow these steps:
- Download the modifier file from Yandex Metrica.
- Go to the OpenCart admin dashboard and log in.
- Go to Extensions -> Installer.
- Click Upload and select the downloaded file.
- Go to Extensions → Modifications, select the added modifier, click the
icon, and then click the
icon.
Useful links |
Online training |