Analytics

We provide plugin developers with methods to collect analytics about their plugins and measure their performance. The portal SDK exposes the pushGtmEvent method to push events to Google Tags Manager that then triggers multiple services including Google Analytics.

Event Name Structure

The naming convention is <plugin_code>_<context>.<event>. So, for example; event naming for a plugin with a lowercase plugin code reports for a modal component, the following will be valid event naming:

  • reports_modal.opened
  • reports_modal.closed
  • reports_modal.clicked

Events names are automatically prefixed with the plugin code they are fired from it. This is to avoid naming errors and mistakes as a best practice. But in case it is prefixed, pushGtmEvent won't add it.

Automatically Tracked Events

The Portal automatically tracks a number of events automatically. They are separated into Action Events and Timing Events:

Action Events

They are events fired due to occurrence of a certain action.

  • <plugin_code>.opened: When the plugin icon is clicked in the navigation bar.
Property Description
Event Category Plugin Code
Event Action <plugin_code>.opened
  • <plugin_code>.internal_api_errored: When an API request, create by createGlobalApi, responds with a failed response with status code 50x.
Property Description
Event Category Plugin Code
Event Action <plugin_code>.internal_api_errored
Event Label URL of the failed API request

Timing Events

They are similar to Action Events but also provide the time duration a certain action took from start to finish.

  • <plugin_code>.plugin_loaded: Measures the duration the client needs to fetch and parse plugin's JavaScript bundle.
Property Description
Timing Category Plugin Code
Timing Variable <plugin_code>.plugin_loaded
Timing Value Time in milliseconds from start to load scripts until before executing init() method
  • <plugin_code>.plugin_initialised: Includes the measurements of plugin_loaded and the running time of the plugin's init() function.
Property Description
Timing Category Plugin Code
Timing Variable <plugin_code>.plugin_intialised
Timing Value Time in milliseconds from start to load scripts until finish executing init() method
  • <plugin_code>.api_loaded: When any API request, create by createGlobalApi, responds. We track how long it took for the API to respond. This event fires only 1% of the total API requests made.
Property Description
Timing Category Plugin Code
Timing Variable <plugin_code>.api_loaded
Timing Value Time in milliseconds the API request took to respond
Timing Label URL of the requested API endpoint

Plugins Errors Tracking

We track any code exceptions using Sentry and tag it with the plugin code and the current user id.

results matching ""

    No results matching ""