Overview
Purple DS apps support tracking via several different tracking services. There are three different types of events:
Actions
Views
Purchases
Additionally, if the tracking service supports this, there are several attributes which describe the state of the app / usage by a user.
Tracking Services
Currently Purple DS apps support several different tracking services.
Not all tracking services support all event types. See the linked pages below for detailed information about the supported event types of each tracking service.
Configuration
There are two sets of configurations:
the default/base configuration, included in the Purple Kit. See https://redmine.purplepublish.com/issues/5094 for the latest version.
the app configuration, included in the dynamic resources
The app configuration is merged with the “default” configuration. This means that every entry in the app configuration overrides the value in the default configuration.
This allows to have standard configurations for all events which can be overridden for each tracking service.
For this purpose a new JSON file tracking_config.json is used in the dynamic resources. This configuration makes it possible to map internal event names to custom event names.
The JSON is structured as follows:
Each event has the following configuration options:
enabled
Each event can be selectively enabled or disabled.
templates
Each event has templates. They are used to configure the tracking services, e.g. Google Analytics has three templates for action events: “category”, “action” and “label”. The names map to the API of the tracking service. Each tracking service supports different templates.
The templates can contain placeholders. They can be referenced in the config by using the following syntax: {{PLACEHOLDER_NAME}}
, e.g. {{ISSUE_ID}}
.
A list of all available placeholders can be found here.
parameters
Additional parameters (key-value pairs) can be send with each event if the tracking service supports this. Every key will be included in the event. The values can contain all placeholders supported for the event and will be evaluated (see above) when sending the event to the service.
Events
A current list of all available events, parameters and default values can be found here.