Parametrization

The Yandex.Metrica Logs API supports parameter setting based on parameterization. This feature is available for most fields.

Using parameterization, you can specify the attribution model. The parameter is specified in angle brackets <>. For example, ym:s:<attribution>TrafficSource.

Possible values:

  • first: The first source.
  • last: The last source.
  • lastsign: The last significant source (used by default).
  • last_yandex_direct_click: The last click from Yandex.Direct.

The values that define cross-device attribution are also available:

  • cross_device_first: The first source, including sessions from all the user's devices.
  • cross_device_last: The last source, including sessions from all the user's devices.
  • cross_device_last_significant: The last significant source, including sessions from all the user's devices.
  • cross_device_last_yandex_direct_click: The last click from Yandex.Direct, including sessions from all the user's devices.
  • automatic: Automatic attribution. For more information, see the Help section.

You can also specify the attribution model explicitly, for example, ym:s:lastTrafficSource.