Request parameters

The Reporting API supports parametrization of dimensions and metrics.

Parametrization is a mechanism for setting parameters for certain dimensions and metrics.

The parameters are defined in angle brackets <>. For example:

  • To group users by a string user attribute: ym:u:customStringAttribute<profile_attribute_id>.

  • To get the sum of client event parameter values: ym:ce2:sumParamValues<param_value_path>.

The existing parameters are:

Parameter

Name

Description

Default value

profile_attribute_id

Profile attribute ID

ID of profile attributes created in the app settings.

No

url_parameter_key

URL parameter

URL parameter name.

No

currency

Currency

Some dimensions allow setting the currency.

Acceptable values: RUB, USD, EUR, YND. See also ISO-4217.

No

app_currency

App currency

For example, in-game currencies in e-commerce apps.

No

param_value_path

Path in JSON

Path in JSON where nodes are separated by a dot. For example, stat.time_in_app. It is used in a number of metrics for working with a node value for the specified path.

No

inapp_revenue_type

In-App Revenue type

For example, one_time_purchase, subscription_started, subscription_renewed, subscription_cancelled. You can get an up-to-date list for the app by requesting the ym:r:inappRevenueType dimension.

No

There are three ways to set a parameter in an expression:

  • To set different parameter values for different expressions, specify the parameter directly in the expression. For example, ym:u:customStringAttribute1000.

  • To set one parameter for all expressions, add the expression parameter to the request in its original form. For example, ...&dimensions=ym:u:customStringAttribute<profile_attribute_id>&profile_attribute_id=1000&....

  • If you need to parameterize dimensions or metrics with different parameter values, and these parameters can accept any string, use curly brackets. For example, ym:ce2:sumParamValues{'duration.max'}.

You can combine these methods in a single request.

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support Suggest an improvement for documentation