3rd party integrations
...
Purple Tracking
Tracking Configuration

Full example: How to configure your events

20min

Summary

In this article we show you an example how to create a full working tracking configuration supporting the use cases we defined for that example.

At this point we will summarize your findings again

If you have arrived at this point, then you have learned everything about the structure and configuration options of the "tracking_config.json" file. Summary

To recap you have learned

Now you are ready to master configuring your tracking. Congratulations! Finally, you are cordially invited to go through all the configuration options described as follows.

Lets start step by step:

Define your USE-CASES

We will start with the most important point:

"Identifying your use cases" The emphasis here is on "your". While Purple offers a "ready to use" config that is sufficient for common use cases, it still needs further customization if your use cases are not covered.

Your use cases influence which tracking service you have to use, which events or attributes you need for this and how these are configured in detail.

We sum up some simple USE-CASES (in a real world scenario your USE-CASES may be more complex.):

  • I want to know my top 5 downloads in 2022.
  • I want to know which issues/pages have been bookmarked.
  • Which search terms are used in the internal search of the app?
  • Does anyone use the app menu?
  • Does anyone buy subscriptions?
  • I want to offer a discount to inactive subscribers to encourage them to subscribe again (via push or in app message).

Select your tracking services for your USE-CASES

Identify requirements for the tracking services used:

In our example, we want to notify app users on the one hand via push and on the other hand via in-app message.

Our decision falls on

  • Firebase to reach app users via push and
  • Airship to reach app users via in app messages by airships message center.

Select needed events and attributes for your USE-CASES

In the next step, we first have to generalize our use cases and then find the appropriate event or attribute for it (we look for these in the Tracking Events chapter).

Generalize USE-CASES

This step is necessary because a formulated use case often represents an evaluation of events. Based on our example: The use case "I want to know my top 5 downloads in 2022" represents an evaluation of events in the backend of the tracking service and is not carried out by the tracking of the app.

The following overview shows the result of generalization and the search for events and attributes. The individual use cases are also already grouped by event type:

Action-Events

USE-CASE

I want to know my top 5 downloads in 2022.

Generalization

For this evaluation we need the information about: Which issues are downloaded?

Resulting event

USE-CASE

I want to know which issues/pages have been bookmarked.

Generalization

For this evaluation we need the information about: Which bookmarks are created?

Resulting event

USE-CASE

Which search terms are used in the internal search of the app?

Generalization

The use case already has a general formulation.

Resulting event

View-Events

USE-CASE

Does anyone use the app menu?

Generalization

The use case already has a general formulation.

Resulting event

APP_MENU

Purchase-Events

USE-CASE

Does anyone buy subscriptions?

Generalization

For this evaluation we need the information about: Which subscriptions are purchased?

Resulting event

Attributes

USE-CASE

I want to offer a discount to inactive subscribers to encourage them to subscribe again (via push or in app message).

Generalization

For this evaluation we need two pieces of information:

  • All app users who have ever purchased a subscription.
    • This is already done with the purchase event STOREFRONT_SUBSCRIPTION_PURCHASED
  • All app users who currently do not have an active subscription.
    • This is done with the resulting attribute HAS_ACTIVE_SUBSCRIPTION

So this use case is a combination of this event and attribute.

Resulting attribute

Configure these events and attributes

Now that we know our events and attributes, it's time to configure them in the "tracking_config.json":

Action-Events

STOREFRONT_ISSUE_BOOKMARK_ADDED

Airship
Firebase


ISSUE_DOWNLOADED

Airship
Firebase


STOREFRONT_SEARCH_PERFORMED

Airship
Firebase


View-Events

APP_MENU

Airship
Firebase


Purchase-Events

STOREFRONT_SUBSCRIPTION_PURCHASED

Airship
Firebase


Attributes

HAS_ACTIVE_SUBSCRIPTION

Airship
Firebase


Optional: Enable or disable events

We set our tracking services as follows:

Enabled and disabled events


Final code example

Finally, we put everything together and get the following "tracking_config.json":

tracking_config.json

Final code example


How to proceed from here

To test this tracking configuration, you need to make it available in your app. Since this file is part of the dynamic resources, you can integrate it with the Purple Experience Builder at this point. Further requirements: It is also neccessary …

  • that you have your own account for the used tracking services and configured them.
  • that your tracking services are configured and activated in your app in the purple manager.