Configuration: Enable or disable events or attributes
This article shows you how to enable or disable individual events or attributes, all events of the same type or all attributes. In the following figure, we first show a rough overview of the related properties and their relationships before we dive into the topic.
As you can see there are properties to enable or disable all events from the same type and one for all attributes. In addition to that every single event or attribute can be enabled or disabled by overriding the global configuration.
The following properties are a global configuration for events or attributes of a tracking service:
Property | Description |
---|---|
eventsEnabledByDefault | This property enables or disables all action events. Values: true => enable all action events false => disable all action events |
viewsEnabledByDefault | This property enables or disables all view events. Values: true => enable all view events false => disable all view events |
purchasesEnabledByDefault | This property enables or disables all purchase events. Values: true => enable all purchase events false => disable all purchase events |
attributesEnabledByDefault | This property enables or disables all attributes. Values: true => enable all purchase events false => disable all purchase events |
Using the following property you may enable or disable this event or attribute.
Property | Description |
---|---|
enabled | This property enables or disables this event or attribute. Values: true => enable this event or attribute false => disable this event or attribute or omitted since this property is optional. When omitted the app uses the fallback to
|
Two USE-CASES are described below, whether the triggered events are sent to the tracking service or not. These USE-CASES show the initial situation as well as the individual steps used for the evaluation in detail.
(1) USE-CASE "ISSUE_DOWNLOADED"
The first USE-CASE is simple and the configuration is as follows:
- Airship is added and configured in the app as a tracking service.
- Events for Airship are configured that all events are sent by setting "eventsEnabledByDefault" to true.
- The event "ISSUE_DOWNLOADED" is configured, but the "enabled" property is omitted.
Order of evaluation:
- The app user taps on the download button of an issue so that the download starts.
- After the download completes, the app fires the "ISSUE_DOWNLOADED" event.
- The app's internal tracking management searches for this event configuration.
- The event configuration is available and the next step is to check for the “enabled” property.
- The "enabled" property has been omitted.
- The tracking management therefore searches for the “eventsEnabledByDefault” property.
- The property is available and the value is true.
=> The event is sent to Airship.
(2) USE-CASE "STOREFRONT_ISSUE_BOOKMARK_ADDED"
The second USE-CASE is simple and the configuration is as follows:
- Airship is added and configured in the app as a tracking service.
- Events for Airship are configured that all events are sent by setting "eventsEnabledByDefault" to true.
- The event "STOREFRONT_ISSUE_BOOKMARK_ADDED" is configured and the "enabled" property is set to false.
Order of evaluation:
- The app user taps on the bookmark button of an issue so that one bookmark gets created.
- After the bookmark has been added, the app fires the "STOREFRONT_ISSUE_BOOKMARK_ADDED" event.
- The app's internal tracking management searches for this event configuration.
- The event configuration is available and the next step is to check for the “enabled” property.
- The property is available and the value is false.
=> The event is not sent to Airship.