Market for partners

Getting detailed reports on orders

You can get general information about all orders, as well as detailed information on each of them.

To get reports on orders, you need to set up passing parameters on the order contents (to support data transfer, you need support for working with order parameters, which is discussed in the section How to set up a counter). To do this, you need to make changes to the Metrica counter code on the Подтверждение заказа page.

<script type="text/javascript">
var yaParams = {/*Order contents here*/};

Example of initializing yaParams:

var yaParams = 
  order_id: "3675",
  order_price: "11000.50", 
  currency: "RUR",
  exchange_rate: "1",
   id: "11", 
          name: "телевизор",
   price: "10600"
   id: "22", 
          name: "наушники",
   price: "400.50"

Explanation of parameters:

  • order_id — The order ID; character values are allowed, but must be put in quotation marks. Optional parameter.

  • order_price — Amount of the order made by the user in the specified currency.

  • currency —Currency of the order (allowed values are: RUR, UAH, BYR, USD, EUR); the default is the local currency, which is determined based on the store's region.

  • exchange_rate — The exchange rate for currency if the store uses its own rate (by default, 1).

    If a different currency is specified when making the order, in order to convert it to a supported currency, set currency (the currency to convert to) and exchange_rate (the exchange rate for conversion).

    For example: 1 Yandex unit = 35 rubles, so currency=RUR, exchange_rate=35.

  • id — Identifier of a product from the store (may be characters).

  • name — Name of the product.

  • price — Price of the product in the currency set in currency.

Data structures (products in the order) are formed according to the JSON standard.

If your website does not have a separate page for order confirmation (this function is performed by a Отправить заказ button or link), the goal must be declared as recommended in the .

<a href="someurl" onclick="yaCounterCOUNTER_ID.reachGoal('TARGET_NAME', {/*Order contents here*/}); 
return true;">link contents</a>
  • COUNTER_ID — Your counter's number in Metrica.

  • TARGET_NAME — Any code word that identifies the goal (for example, "price_download").

If AJAX technology is used on the site (that doesn't require page reloading), and the order page allows the customer to change the order contents, you must reinitialize the structure every time when processing a click on the button or link to confirm the order. In other words, for every call of reachGoal you need to reinitialize yaParams.

Rate this article
Thank you for your feedback!