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

Transmitting custom session parameters.

Attention. Some of the field names are reserved for transmitting e-commerce data. Do not use these names to send session parameters. Do not send your 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});

* Required parameter.

Goal price

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

Example of transferring a goal price:

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