Use Events to collect data about interactions with your content
Events are user interactions with content that can be tracked independently from a web page or a mobile application. Buttons, pageviews, pictures etc, practically anything clickable, are all examples of actions you might want to track as Events.
Events are useful in understanding behavior of users on your web or mobile application because Events allow drilling down and grouping data to be more intuitive and flexible. This means that you can use better targeted segments and you will have more accurate data to play with when doing marketing. We also support an attribute inside an event, instead of being "flat" with predefined parameters inside an event. This greatly improves targeting and easens the event configuration to your app or website.
Read more about segments at Segment API Overview.
Adding Event data
You need to add Event tracking code to your site or app in order to see data in your Event reports and segmentation. Read more at Event API Example.
An Event has the following types. An Event hit includes a value for each type.
- Example: “Johnny”
- Example: true
- Example: 15.50
- Example: “04:10:00”
- Example: “2015-10-01 14:00:00”
Beemray also allow to have a structure of an event. A structure within an Event is set of key-(type)-value pairs like:
Lets use an event called "PizzaPayment" with following attributes: title, price, extraCheese, paymentType as an example. Definition of types (human readable in this case, native element types can be found at EventAPI example documentation) will be something like these:
Now we have a structure defined for an event called "PizzaPayment" within this account/apikey I am working with.
Next step: How to get values for this PizzaPayment event from all the devices that are tracking the event:
Jake buys a pizza from Delipizza's mobile app and confirms the payment after he has chosen a pizza called the "Vegan's heaven". He pays the price of 7EUR. He did not choose any extra cheese and pays it with his debit card. So, the mobile application sends this previously described PizzaPayment event with the following values when "Confirm Payment" button is clicked:
value: Vegan's heaven
Harry loves meat, he is hungry and does not have a lot of money. Still, he _must have_ a_pizza. He saves some cents by leaving the extra cheese out. By clicking the "Confirm payment button" the mobile application sends the event to the backend with the following data (IMPORTANT: Strictly following the structure of event PizzaPayment!!)
value: Chubby ham 'n bacon special
..and so on
After this (and many other PizzaPayments) you have data to build clever insights and segments using the users’ behaviour on PizzaPayments like "all the PizzaPayments where price is less than 10EUR and paymentType = credit_card" - and way more complex queries as well.
Above example is a simplistic approach of how to work with the Events. Way more complicated stuff can be built using the structured events.
The design model for Event tracking is highly flexible, and its use can be extended well beyond the common model of user-triggered events—the design decision is up to you. For this reason, useful Event tracking requires collaboration with your marketing users to plan the best approach for getting the insights that the business needs.
- Determine in advance all elements for which you want to track data. Even if you initially track only a single object on your website, having an overall sense of the various objects/events you want to track will help you establish a structure that scales well with an increase in the number and type of Event tracking.
- Work with your sales and marketing department to plan your Events to be tracked. Knowing in advance what things are useful to drive sales, will direct the structure of your Event tracking implementation. For example, the sales and marketing might be interested in tracking user in various areas of the city , but might also be interested in seeing what is the relation of certain product types with the location. In that case, you can plan ahead to have meaningful names in your event calls. Name is always static - only value varies dependent the location.
- Adopt a consistent and clear naming convention. In the process of implementing Event tracking, every name you supply appears in the administration interface.