3rd party integrations
...
Purple Tracking
Tracking Events

Logging raw events

7min

For a better understanding of what events are being logged in your App Analytics, it is possible to enable debug logging of raw tracking events.

It is only possible to enable this feature on the preview version of a Purple App or Purple Website.

Prerequisites

Web
Android
iOS

There are no special requirements for web other than using a url with the preview=true parameter, i.e.

  • web.purplemanager.com/<web_newsstand_slug>/<path_to_a_view>?preview=true
  • <custom_domain>/<path_to_a_view>?preview=true

in the browser of the user's choice.

Enabling and disabling logging

Open the web developer tools in your browser.

Web
Android
iOS

Depending on the browser, opening the developer tools might require different steps. Please see the documentation of the corresponding browser how to open them.

In the developer tools, open the console tab and paste the following line and then press enter:

JS


This setting is persisted and stays enabled even after app restarts or the page reloads until the same command is executed with the value false instead of true.

Reading the logs

Web
Android
iOS

In web, these logs always start with [TRACK], so to only show these tracking events, it is recommended to type [TRACK] into the search field of the logs.

The logs appear in the same console where the command to enable logging was executed.

Structure of the logs

The logs have the same structure on all platforms, it following this pattern:

[TYPE] KEY PLACEHOLDERS

TYPE is one of ACTION, VIEW, PURCHASE and ATTRIBUTE which all correspond to the event types described in the following sections.

KEY is the key of the event as described in the above sections.

PLACEHOLDERS are key-value pairs of the placeholders available for the given event and their corresponding values.

Note that these events and their placeholders is just the raw data that is available and that does not mean that all those events are being sent to tracking services.

This data is meant to visualise the options one can use to configure the tracking_config.json, see Tracking Configuration and depending on that configuration and consent of the user, the final tracking data might be different.

Examples

Web
Android
iOS

Google Chrome developer tools:

Google Chrome developer tools
Google Chrome developer tools