3rd party integrations
...
Purple Tracking
Tracking Configuration
Configuration: Event and attribute
12min
summary this article is about the general composition of an event and an attribute itself in the following you will learn the structure and the meaning of the individual components and which you can change and how this article is structured as follows structure of events and attributes introduction to the placeholder template engine example structure of events and attributes the generic structure of an event or attribute is divided into four parts, which you can see in the figure below summary of the parts (1) the " tracking key tracking key " (2) the „ enabled enabled “ property (3) the key/value pairs of „ templates templates “ (4) the key/value pairs of „ parameters parameters “ these four components are described in detail below property "tracking key" property "tracking key" property "tracking key" the value of a tracking key is a constant and is used to uniquely assign an event that is fired within the app and its configuration within the " tracking config json " file the tracking key itself is always uppercased and separated by underscores so it is important that you always use the constants provided by purple and do not change these tracking keys in your configuration the events itself are all documented using these tracking keys which you can find in the chapter tracking events docid\ wmhcwvhbk60lcgh5urtfo and its sub chapters but some of the events are not documented this way, because of its dependency to the content type content type of the related content an example may be action events docid 8rra4o7vzdaw13y joqek you can find a detailed description about this topic in the chapter content types docid\ tz lfyagszxfbnspzmiwq if you're having trouble determining what content types your content have, contact purple's customer success or your assigned purple project manager for help ( ) ( ) this definition applies solely to the events provided by purple the tracking keys of additional, customer specific events can be freely defined configuration summary the tracking key maps the app internal event to the event configuration within " tracking config json " always completely uppercased and separated by underscores do not change these keys property "enabled" property "enabled" property "enabled" using this property you may enable or disable this event or attribute there are three cases explicitly set true true => enable this event for tracking false false => disable this event for tracking or omitted \=> when omitted the app uses the fallback to the " eventsenabledbydefault eventsenabledbydefault " " viewsenabledbydefault viewsenabledbydefault " " purchasesenabledbydefault purchasesenabledbydefault " " attributesenabledbydefault attributesenabledbydefault " properties used when configuring your tracking service within the " tracking config json " file but wait, you never heard about that enable properties? thats right and all you have to know about this, is described within the chapter configuration enable or disable events or attributes docid\ tpw pztetqgvomytvj dd configuration summary this property enables or disables this event or attribute three states are possible true or false assigned to the enabled property enabled property is omitted the key/value pairs of "templates" property "templates" property "templates" each event or attribute has templates they are used to configure the tracking services the template names map to the native api of the specific tracking service sdk and each tracking service supports different templates template a template consists of a template template key key and a value value the keys must not be changed because they are fixed and used for mapping the value can be changed to anything you want depending on the tracking services you use, there may be some restrictions that apply when transmitting the keys keys and values values the length of key is restricted the length of value is restricted the allowed characters are restricted structure of a template (key/value pair) key key common template keys are " action action " for action events docid 8rra4o7vzdaw13y joqek and purchase events docid\ mixj9wvzalbapwdbpat29 " name name " for view events docid\ mixe5 ijkbr47eummdyga and attributes docid\ dfucrmfgqfurguiv8nltc other template keys used by specific tracking services are possible you can find an overview of which templates a specific tracking service supports in the tracking services docid 3ofsgplkna2zz3rzik3fg chapter and its sub chapters value value the value can be changed arbitrarily and can contain placeholders what placeholders are is described in detail in the configuration enrich event data docid\ vexp4mbwybjar50smsx1t chapter configuration summary name of key is fixed and must not be changed values can be changed to anything and can contain placeholders restrictions may exist you have to consider in your configuration the key/value pairs of "parameters" property "parameters" property "parameters" each event has parameters and they could be used to enrich your event data every parameter is sent together with the assigned event parameter a parameter consists of a parameter key parameter key and a value value the keys and values can be changed to anything you want however, it may happen that a specific tracking service can restrict this freedom of naming due to the tracking services you use, there may be some restrictions that apply when transmitting the keys keys and values values the length of key is restricted the length of value is restricted the allowed characters are restricted the count of parameters itself is restricted structure of a parameter (key/value pair) key key common parameter key names are " issue id issue id " " publication id publication id " " product id product id " the parameter key name is freely defined however, is it recommend to follow purples proposal for its naming convention which is described in detail within the configuration enrich event data docid\ vexp4mbwybjar50smsx1t in the configuration enrich event data docid\ vexp4mbwybjar50smsx1t chapter value value the value can be changed arbitrarily and can contain placeholders what placeholders are is described in detail in the configuration enrich event data docid\ vexp4mbwybjar50smsx1t chapter configuration summary name of key can be changed but is not recommend you should follow purple's naming convention values can be changed to anything and can contain placeholders restrictions may exist you have to consider in your configuration introduction to the placeholder template engine values of templates and parameters may contain placeholders within the value part and are referenced in the „ tracking config json “ by using the following syntax {{placeholder name}} {{placeholder name}} the placeholder template engine replaces the placeholder with its associated value, which is only available and known at app runtime a full description about the functionality of placeholders can be found in chapter configuration enrich event data docid\ vexp4mbwybjar50smsx1t example in the following you see a tracking configuration simplified to events and attributes tracking config json example code { "default" { "events" {}, "views" {}, "purchases" {}, "attributes" {} }, "airship" { "events" { "storefront issue bookmark added" { "templates" { "action" "issue bookmark added" } }, "issue downloaded" { "templates" { "action" "issue downloaded" } }, "storefront search performed" { "templates" { "action" "search performed" } } }, "views" { "app menu" { "templates" { "name" "app menu" } } }, "purchases" { "storefront subscription purchased" { "templates" { "action" "subscription purchased" } } }, "attributes" { "has active subscription" { "templates" { "name" "has active subscription" }, "parameters" { "tag group" "subscriptions" } } } }, "firebase" { "events" { "storefront issue bookmark added" { "templates" { "action" "issue bookmark added" } }, "issue downloaded" { "templates" { "action" "issue downloaded" } }, "storefront search performed" { "templates" { "action" "search performed" } } }, "views" { "app menu" { "templates" { "name" "app menu" } } }, "purchases" {}, "attributes" { "has active subscription" { "templates" { "name" "has active subscription" } } } } }