params
Transmits custom session parameters.
ym(XXXXXX, 'params', parameters);
Parameter | Default value | Type | Description |
---|---|---|---|
parameters * | — | Object | Array | Session parameters. Example of sending an object: Example of sending an array: |
parameters object fields: | |||
order_price | — | Double | Revenue by goal. You can set the cost in currency or Yandex units. |
currency | — | string | 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. |
Parameter | Default value | Type | Description |
---|---|---|---|
parameters * | — | Object | Array | Session parameters. Example of sending an object: Example of sending an array: |
parameters object fields: | |||
order_price | — | Double | Revenue by goal. You can set the cost in currency or Yandex units. |
currency | — | string | 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.
Revenue by goal
In addition to custom session parameters, you can transmit the revenue in the method parameters. Details about revenue by goal
Example:
var visitParams =
{
test: {myParam: 123}
};
var goalParams =
{
order_price: 1000.35,
currency: "RUB"
};
ym(XXXXXX, 'params', visitParams, goalParams)