All events stored by the system have common parameters which are called contextual parameters
.
These parameters will be systematically stored by the engine, whatever it is configuration, application or system.
They will therefore always be available and it will not be necessary to register specifically, the system will do so automatically.
Detail of default contextual parameters
surfer.uid | UID of the surfer who triggered the event |
surfer.login | User Login |
surfer.role.uid | UID of the user role |
surfer.role.name | Name of the user’s role (name) |
surfer.locale.language | Language code in ISO-639 format |
surfer.locale.country | Region code in ISO-3166 format |
session.uid | Login of the session |
session.duration | Time elapsed since the start of the session (in ms) |
session.type | Session type (bo|fo|admin) |
remoteaddr | User’s IP address |
referer | Last URL known to the user |
remotecountry | Country in which the user is located (ISO-639 code) |
uri.path | path to the current URL |
uri.qs | Query String of the current URL |
user_agent | Browser Agent |
user_os | Operating system used |
user_browsergroup | Browser used (group name) |
user_browser | Browser version used |
Important
All those parameters are systematically saved by the application for each event.
Access to context parameters
In dashboards, context parameters can be used to filter data in search options or as data used to represent to the user.
Contextual parameters are all stored under the key event.context
.
If you need to retrieve one of the variables, you can access it by its key event.context.VARIABLE_NAME
.
For instance, surfer’s role UID will be retrieved with event.context.surfer.role.uid
.
connexion_search_option.getQuery().mustNotEquals("event.context.surfer.role.uid", "role_1");
connexion_search_option.putAggregation("pie_connexions_by_role", Analytics.TermsAggregation("event.context.surfer.role.uid", 20));
Logging extra custom surfers parameters
Since 11.15.0 it is now possible to add custom surfer’s parameters to the context parameters. Simply add the structure field tag analytics/surfer
on any user property to have it logged at each analytics event.
When available those parameters will be found under the extra
property of the context parameters (ie. event.context.extra.bolanguid).
A custom context parameter will always be retrieved with event.context.extra.VARIABLE_NAME
.
Note
The uid
suffix at the end of the parameter name is automatically added by the application on child
and child multiple
properties.