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 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 to setup the feature in android apps, the following requirements must be met a mobile device connected via usb with enabled developer options, see inspecting the purple experience in android apps docid 77jjexeefhigwennbqcpp android studio, see https //developer android com/studio https //developer android com/studio google chrome to setup the feature in ios apps, the following requirements must be met a device connected via usb with enabled safari inspector, see inspecting the purple experience in ios apps docid\ rplgcyaqsdzzs9kbnm8he a mac os device with safari and the console app enabling and disabling logging open the web developer tools in your browser depending on the browser, opening the developer tools might require different steps please see the documentation of the corresponding browser how to open them assuming the prerequisites are met, perform the following steps install the preview app on the android device open the app and skip all dialogs until the initial view is rendered connect it via usb open chrome //inspect select one of the views in the app see inspecting the purple experience in android apps docid 77jjexeefhigwennbqcpp for more details assuming the prerequisites are met, perform the following steps install the preview app on the ios device open the app and skip all dialogs until the initial view is rendered connect it via usb open safari on the mac os device in the menu in develop select the ios device select one of the views in the app see inspecting the purple experience in ios apps docid\ rplgcyaqsdzzs9kbnm8he for more details in the developer tools, open the console tab and paste the following line and then press enter purple tracking debug({logging true}) 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 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 on android, these logs always have the tag track this can be later used for filtering logs are printed to android's logcat there are two ways to view these logs either the command line using adb or opening android studio with any project open and opening the logcat view ensure that the app is connected via usb and usb debugging is enabled using android studio open android studio open any project to start the whole editor a sample project will suffice in the menu, select view > tool windows > logcat on the top left, select the connected device enter tag\ track to show only messages with such a tag optional enter package \<packagename> to limit these logs to the corresponding app where \<packagename> has to be replaced with the actual package name of the app using the command line open the terminal app and run the following command adb logcat track\ d " "\ s this command reads all the logs that have the tag track on debug level and will silence the rest see https //developer android com/tools/logcat https //developer android com/tools/logcat#syntax for more details on ios, these logs always have the category track this can be later used for filtering logs can be read using the console app on mac os ensure that the ios device is connected with the mac os device open the console app ensure that include info messages is checked (console app menu > action > include info messages) select the device on the left side press on the start button to start reading logs type track in the search field and press enter left of the new track entry, tap on any and select category optional filter by app enter the name of the app in the search field and press enter left of the new app name entry, tap on any and select process note the app name is the last segment of the bundle identifier, i e com sprylab apps testing would require to enter testing in the search field 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 action events docid 8rra4o7vzdaw13y joqek view events docid\ mixe5 ijkbr47eummdyga purchase events docid\ mixj9wvzalbapwdbpat29 attributes docid\ dfucrmfgqfurguiv8nltc 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 docid\ sxkxo oept7crfzzob9nw and depending on that configuration and consent of the user, the final tracking data might be different examples google chrome developer tools android studio android studio command line command line console app console app