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 |
ID of profile attributes created in the app settings. |
No |
|
|
URL parameter |
URL parameter name. |
No |
|
|
Currency |
Some dimensions allow setting the currency. Acceptable values: |
No |
|
|
App currency |
For example, in-game currencies in e-commerce apps. |
No |
|
|
Path in JSON |
Path in JSON where nodes are separated by a dot. For example, |
No |
|
|
In-App Revenue type |
For example, |
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.