Currently Log Analytics uses the Custom Variables feature in various ways:
- Tracking whether user is
Bot or Not-Bot, see --enable-bots
- Tracking the HTTP Status code in a custom variable
Http-code
- Parsing any log field or custom field in a custom variable, see
--w3c-field-regex
- and
--regex-group-to-visit-cvar
- and
--regex-group-to-page-cvar
As we are planning to deprecate Custom Variables in matomo-org/matomo#11524 it is necessary to change our use of Custom Variables and use Custom Dimensions instead.
Solution
So we need to use Custom Dimensions them to track
- whether a user is a bot or not,
- the http status code of each action,
- and the ability to parse any log field in a new (or existing) custom dimension.
The script will therefore now need to fetch the list of dimensions available for the site, and possibly create a new custom dimension if it does not exist yet.
Maybe we should keep the existing features using Custom Variables for BC?