---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/support/metrica/en/data/e-commerce.md
  - https://yandex.com/support/metrica/es/data/e-commerce.md
  - https://yandex.com/support/metrica/pt/data/e-commerce.md
  - https://yandex.com/support/metrica/ru/data/e-commerce.md
  - https://yandex.com/support/metrica/tr/data/e-commerce.md
  - https://yandex.com/support/metrica/zh/data/e-commerce.md
  - href: en/data/e-commerce.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: How to manually enable E-commerce
description: How to manually enable e-commerce.
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/en/llms.txt


# How to manually enable E-commerce

<!-- source: en/_includes/code/counter-initialize/id-counter-initialize/rest-js.md -->
{% note warning %}

Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don’t know these languages, contact your website developer or webmaster.

{% endnote %}
<!-- endsource: en/_includes/code/counter-initialize/id-counter-initialize/rest-js.md -->


1. <!-- source: en/_includes/ecommerce/enabling/id-enabling/1.md -->
   [Go to Yandex Metrica](https://metrica.yandex.com).
   <!-- endsource: en/_includes/ecommerce/enabling/id-enabling/1.md -->
    
1. <!-- source: en/_includes/ecommerce/enabling/id-enabling/2.md -->
   Select the tag that you want to enable E-commerce for.
   <!-- endsource: en/_includes/ecommerce/enabling/id-enabling/2.md -->
    
1. 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.
    ![](../_assets/ecom-set.png){.border-yes}
    
    You can also initialize a tag with the [ecommerce: true](https://yandex.com/support/metrica/en/code/counter-initialize.md#param-ecommerce) parameter.
    
1. Install (or update) the code snippet on all the site pages that contain information about products and orders (item details, the “Add to basket” button, and so on).
    To do this, copy the tag code. Make sure that the code snippet on the site contains the line: `ecommerce:"dataLayer"`.
    
    ![](../_assets/ecom-code.png){.border-yes}
    
    Yandex Metrica automatically collects data from your site, with no extra setup required, if you're already set up with Google Analytics Enhanced Ecommerce or Ecommerce (GA4) (including with the Global Site Tag), because it uses a compatible data format. In this case, skip step 5.
1. On your website, [configure data transfer](https://yandex.com/support/metrica/en/ecommerce/data.md) (about adding an item to the basket, buying something, etc.) via the JavaScript API. To transmit information, you need to create a script on the site that will be responsible for a certain event (for example, making an order) in the [specified format](https://yandex.com/support/metrica/en/ecommerce/data.md). You can configure the transmission of all events to receive more complete data, or only some of the events.
    Follow this step if you don’t have Google Analytics Enhanced Ecommerce. For each action, create an ecommerce object and place it in the data container (by default — `dataLayer`).
    
1. [Check](https://yandex.com/support/metrica/en/ecommerce/check.md) whether E-commerce is set up correctly.
1. <!-- source: en/_includes/ecommerce/enabling/id-enabling/5.md -->
   Data appears in Yandex Metrica a few hours after the first data transfer. To view reports, got to Yandex Metrica and open **Reports** → **E-commerce**.

   [E-commerce reports](https://yandex.com/support/metrica/en/data/e-commerce-reports.md)
   <!-- endsource: en/_includes/ecommerce/enabling/id-enabling/5.md -->
    

## Learn more

- [Troubleshooting](https://yandex.com/support/metrica/en/ecommerce/troubleshooting.md)

<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com/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/surveys/1705/?&iframe=1&lang=en">
  </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/r/dashboard?)
- [Add a tag](https://metrica.yandex.com/add/)
- [Free tag setup](https://yandex.com/promo/freeservice/metrica?utm_source=help_metrica_en&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com/metrika/)
- [Suggest your idea](https://yandex.com/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 -->

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

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