Metrica

“Visit parameters” report

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

  • Information only available to the site owner (for example, specific user actions).
  • Information about the activity of registered users that is known to the site.
  • 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.

Example. АВ 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:

var yaParams = {ab_test: "red button"};

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

var yaParams = {ab_test: "green button"};

This parameter is transmitted in any convenient way. For example, it can be passed when initializing the counter on product pages or using the reachGoal method 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.

Example. 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">
var yaParams = {'Username': '[% insert the user's login name from the site's template engine %]' || 'Guest'};
var yaCounterXXXXXX = new Ya.Metrika({id: XXXXXX, params: window.yaParams||{}});
</script>

where XXXXXX is the counter ID.