---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://yandex.com/support/metrica/en/ecommerce/check.md
  - https://yandex.com/support/metrica/es/ecommerce/check.md
  - https://yandex.com/support/metrica/pt/ecommerce/check.md
  - https://yandex.com/support/metrica/ru/ecommerce/check.md
  - https://yandex.com/support/metrica/tr/ecommerce/check.md
  - https://yandex.com/support/metrica/zh/ecommerce/check.md
title: Checking E-commerce settings
description: How to check e-commerce settings and the correctness of the transmitted data.
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/en/llms.txt


# Checking E-commerce settings

To check whether E-commerce is set up correctly:
1. Go to the tag settings in Yandex Metrica and make sure that:
    - The **E-commerce** option is enabled.
    - The **Data container** field contains the value `dataLayer` (default) or some other value.
    
1. Check that the code snippet on your site contains the `ecommerce:true` or `ecommerce:"data container"` parameter (the default value is `ecommerce:"dataLayer"`). In the latter case, the name of the data container must match the one specified in the tag settings.
1. Append the `ym_debug=2` parameter to the page URL in the browser’s address bar and reload the page.
    ```httpget
    http://example.com/?_ym_debug=2
    ```
    
1. Perform an action on the page: for example, add an item to the shopping cart. It must correspond to the event [Adding an item to the basket](https://yandex.com/support/metrica/en/ecommerce/data.md#add).
    
    At the bottom of the page, click <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#svg-w16u3j08__clip0_16_20)"><path d="M12 25.0011C18.6274 25.0011 24 19.6285 24 13.0011C24 6.42176 18.7051 1.07913 12.144 1.00195H11.856C5.29491 1.07913 0 6.42176 0 13.0011C0 19.6285 5.37257 25.0011 12 25.0011Z" fill="url(#svg-w16u3j08__paint0_linear_16_20)"/><path d="M0.377686 16H7.49984V24.1286C4.00644 22.7145 1.3305 19.7031 0.377686 16Z" fill="url(#svg-w16u3j08__paint1_linear_16_20)"/><path d="M0.377686 16H7.49984V24.1286C4.00644 22.7145 1.3305 19.7031 0.377686 16Z" fill="url(#svg-w16u3j08__paint2_linear_16_20)"/><path d="M7.5 24.1286V12.9C7.5 11.3599 7.5 10.5898 7.7943 10.0015C8.05316 9.48409 8.46617 9.0634 8.97424 8.79974C9.55179 8.5 10.3079 8.5 11.82 8.5H16.5V24.1286C15.1525 24.674 13.6833 24.9818 12.1446 25H11.8554C10.3167 24.9818 8.84751 24.674 7.5 24.1286Z" fill="url(#svg-w16u3j08__paint3_linear_16_20)"/><path d="M16.5 24.1285V1.87305C20.8977 3.65321 24 7.96471 24 13.0008C24 18.0368 20.8977 22.3483 16.5 24.1285Z" fill="url(#svg-w16u3j08__paint4_linear_16_20)"/></g><path d="M24.5 7.75C24.5 3.74594 21.2541 0.5 17.25 0.5C13.2459 0.5 10 3.74594 10 7.75C10 11.7541 13.2459 15 17.25 15C21.2541 15 24.5 11.7541 24.5 7.75Z" fill="#030F37" fill-opacity="0.4"/><path d="M25 7C25 3.13401 21.866 0 18 0C14.134 0 11 3.13401 11 7C11 10.866 14.134 14 18 14C21.866 14 25 10.866 25 7Z" fill="#EFF2F7"/><path fill-rule="evenodd" clip-rule="evenodd" d="M21.9581 7L20.1177 5.89565C19.9671 5.80529 19.875 5.64254 19.875 5.46692V5.3831C19.875 4.99445 20.299 4.75439 20.6322 4.95435L22.5145 6.0837C22.8157 6.26442 23 6.58993 23 6.94119V7.05881C23 7.41007 22.8157 7.73558 22.5145 7.9163L20.6322 9.04565C20.299 9.24561 19.875 9.00555 19.875 8.6169V8.53308C19.875 8.35746 19.9671 8.19471 20.1177 8.10435L21.9581 7ZM14.0419 7L15.8823 8.10435C16.0329 8.19471 16.125 8.35746 16.125 8.53308V8.6169C16.125 9.00555 15.701 9.24561 15.3678 9.04565L13.4855 7.9163C13.1843 7.73558 13 7.41007 13 7.05881V6.94119C13 6.58993 13.1843 6.26442 13.4855 6.0837L15.3678 4.95435C15.701 4.75439 16.125 4.99445 16.125 5.3831V5.46692C16.125 5.64254 16.0329 5.80529 15.8823 5.89565L14.0419 7ZM17.9304 3.6678C17.9705 3.42671 18.1791 3.25 18.4236 3.25H18.6598C18.9687 3.25 19.2038 3.52743 19.153 3.8322L18.0696 10.3322C18.0295 10.5733 17.8209 10.75 17.5764 10.75H17.3402C17.0313 10.75 16.7962 10.4726 16.847 10.1678L17.9304 3.6678Z" fill="#498BFF"/><defs><linearGradient id="svg-w16u3j08__paint0_linear_16_20" x1="17.2" y1="18.4009" x2="-2.59998" y2="-9.19912" gradientUnits="userSpaceOnUse"><stop stop-color="#4643B9"/><stop offset="1" stop-color="#1E8AFF"/></linearGradient><linearGradient id="svg-w16u3j08__paint1_linear_16_20" x1="-0.000147002" y1="16" x2="4.65322" y2="25.9286" gradientUnits="userSpaceOnUse"><stop offset="0.130208" stop-color="#FF455C"/><stop offset="1" stop-color="#FF1139"/></linearGradient><linearGradient id="svg-w16u3j08__paint2_linear_16_20" x1="7.49984" y1="16" x2="1.24869" y2="21.9154" gradientUnits="userSpaceOnUse"><stop stop-color="#FF2D4C"/><stop offset="1" stop-color="#FF2D4C" stop-opacity="0"/></linearGradient><linearGradient id="svg-w16u3j08__paint3_linear_16_20" x1="62.85" y1="61.2083" x2="68.4051" y2="16.6029" gradientUnits="userSpaceOnUse"><stop stop-color="#3C3BA0"/><stop offset="0.489583" stop-color="#1E8AFF"/><stop offset="1" stop-color="#00B2FF"/></linearGradient><linearGradient id="svg-w16u3j08__paint4_linear_16_20" x1="16.5" y1="2.23386" x2="37.5864" y2="13.3008" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA1A"/><stop offset="1" stop-color="#FFB800"/></linearGradient><clipPath id="svg-w16u3j08__clip0_16_20"><rect width="24" height="24" fill="white" transform="translate(0 1)"/></clipPath></defs></svg>. The debug panel appears.
    
    {% note info %}
    
    The `_ym_debug=2` parameter only works if the [new Yandex Metrica code snippet](https://yandex.com/support/metrica/en/general/tag-info.md) is installed on the website. If you have an older version of the code snippet or the debug panel doesn’t appear, use the [browser console](#debug1).
    
    {% endnote %}
    
1. If the **E-commerce** tab contains information about the action, it means that the order data has been transferred to Yandex Metrica.
    
    ![](../_assets/debug2-ecom.png){.border-yes}

You can also [log your actions](https://yandex.com/support/metrica/en/general/debugger.md#logs) when working with the debugger.


{% cut "Checking via the browser console" %} {#debug1}


<!-- source: en/_includes/popup/id-debug/intro.md -->
Use this method if your website has an older version of the Yandex Metrica tag.
<!-- endsource: en/_includes/popup/id-debug/intro.md -->


1. Go to the tag settings in Yandex Metrica and make sure that:
    - The **E-commerce** option is enabled.
    - The **Data container** field contains the value `dataLayer` (default) or some other value.
    
1. Check that the code snippet on your site contains the `ecommerce:true` or `ecommerce:"data container"` parameter (the default value is `ecommerce:"dataLayer"`). In the latter case, the name of the data container must match the one specified in the tag settings.
1. Append the `ym_debug=1` parameter to the page URL in the browser's address bar and reload the page.
    ```httpget
    http://example.com/?_ym_debug=1
    ```
    Next, open the browser console with the keyboard shortcut **Ctrl** + **Shift** + **J** (**⌥** + **⌘** + **J** for Apple OS).
1. Perform an action on the page: for example, add an item to the shopping cart. It must correspond to the event [Adding an item to the basket](https://yandex.com/support/metrica/en/ecommerce/data.md#add).
1. If you see `ecommerce` in the parameters, and then `add` at the level below, the data format matches the example provided in the [Adding an item to the basket](https://yandex.com/support/metrica/en/ecommerce/data.md#add) event, this means that the order data has been sent to Yandex Metrica. After a while, it appears in [reports](https://yandex.com/support/metrica/en/reports/ecommerce.md). 
    ![](../_assets/check-ecom-debug.png){.border-yes}
    


{% endcut %}


## Checking the correctness of the transmitted data {#data}

The example checks the data that is passed in the event [Adding an item to the basket](https://yandex.com/support/metrica/en/ecommerce/data.md#add).

1. Check that the code snippet on your site contains the `ecommerce:true` or `ecommerce:"data container"` parameter (the default value is `ecommerce:"dataLayer"`). In the latter case, the name of the data container must match the one specified in the tag settings.
1. Open the browser console with the keyboard shortcut **Ctrl** + **Shift** + **J** (**⌥** + **⌘** + **J** for Apple OS).
1. In the console settings, enable the option **Preserve log**.
    ![](../_assets/check-ecom-set.png){.border-yes}
    
1. Perform an action on the page: for example, add an item to the shopping cart. It must correspond to the event [Adding an item to the basket](https://yandex.com/support/metrica/en/ecommerce/data.md#add).
1. In the console, insert the command `JSON.stringify(<container name>)`. The default value is `JSON.stringify(dataLayer)`.

If in the console:

**There is information about the data array.**

1. Copy the array (except for the outer square brackets).
1. To view the data, use any JSON parser.
1. Make sure that the data format matches the event [Adding an item to the basket](https://yandex.com/support/metrica/en/ecommerce/data.md#add).

**The error “dataLayer is not defined” was displayed.**

 
:   This means that the line `window.dataLayer = window.dataLayer || [];` is missing from the code of the page where you are checking the event.

   [How to set up data transmission](https://yandex.com/support/metrica/en/ecommerce/data.md)

**An empty data array was displayed in the form of [] (square brackets).**

 
:   This means that the array is declared (in the example `dataLayer`), but [data transmission](https://yandex.com/support/metrica/en/ecommerce/data.md#add) is not set up for the event being checked.

## 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 -->
