“Session parameters” report

This report provides personalized information about user activity on your site. The following data can be used in this report:

  • Information only available to the site owner (for example, specific user actions).
  • Information the site owner has about the actions of registered users.
  • Information that can be obtained from the user's browser using JavaScript.

To generate the report, pass the session parameters to Yandex.Metrica using the JavaScript API.

AB testing

Let’s say we need to conduct an experiment to determine how the color of the Buy button affects the conversion rate for a “View basket” goal.

If the user is shown a red button, we use the following parameter:

window.yaParams = {ab_test: "red button"};

If the user is shown a green button, we use the following parameter:

window.yaParams = {ab_test: "green button"};

This parameter is transmitted in any convenient way. For example, it can be passed when initializing the tag on product pages or using the reachGoal method that is called when the Buy button is clicked.

After this, we will be able to use the ab_test parameter value in the Yandex.Metrica interface for selecting the corresponding data.

Registered and non-registered users report

Use the following code sample to analyze differences in the behavior of registered and non-registered site users:

<script type="text/javascript">window.yaParams = {'Login': '[% insert the user's login name from the site's template engine %]' || 'Guest'};ym(XXXXXX, 'params', window.yaParams||{});</script>

where XXXXXX is the tag ID.