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

Transmits custom session parameters.

Attention. Some field names are reserved for transmitting e-commerce data. Don't use these names to send session parameters. Don't send custom parameters with reserved ones.
ym(XXXXXX, 'params', parameters);


Default value



parameters *

Object | Array

Session parameters. Example of sending an object:

var myParams = {test: {myParam: 123}};
ym(XXXXXX, 'params', {params: myParams});

Example of sending an array:

var myParamsArray = [{test: {myParam: 123}},
{test: {myParam: 456}}];
ym(XXXXXX, 'params', {params: myParamsArray});
parameters object fields:


Goal cost. You can set the cost in currency or Yandex units



Use this field if you want to pass the goal cost in currency. Yandex.Metrica recognizes three-letter ISO 4217 currency codes

If a different currency is passed, null values will be sent instead of currencies and amounts

* Required parameter.

Goal cost

In addition to custom session parameters, you can transmit the goal cost in the method parameters. Read more about goal cost


var visitParams =
   test: {myParam: 123}
var goalParams =
   order_price: 1000.35,
   currency: "RUB"
ym(XXXXXX, 'params', visitParams, goalParams)