3rd party integrations
...
Purple Tracking
Tracking Configuration

Configuration: Enable or disable events or attributes

7min

Summary

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.

Document image


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.

Enable or disable events or attributes

Complete parts

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

Individual events or attributes

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

  • "eventsEnabledByDefault"
  • "viewsEnabledByDefault"
  • "purchasesEnabledByDefault"
  • "attributesEnabledByDefault"

Example

How is an event evaluated to being tracked or not?

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:

  1. The app user taps on the download button of an issue so that the download starts.
  2. After the download completes, the app fires the "ISSUE_DOWNLOADED" event.
  3. The app's internal tracking management searches for this event configuration.
  4. The event configuration is available and the next step is to check for the “enabled” property.
  5. The "enabled" property has been omitted.
  6. The tracking management therefore searches for the “eventsEnabledByDefault” property.
  7. 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:

  1. The app user taps on the bookmark button of an issue so that one bookmark gets created.
  2. After the bookmark has been added, the app fires the "STOREFRONT_ISSUE_BOOKMARK_ADDED" event.
  3. The app's internal tracking management searches for this event configuration.
  4. The event configuration is available and the next step is to check for the “enabled” property.
  5. The property is available and the value is false.

=> The event is not sent to Airship.