Tracking Customer Events
This guide helps you make a better use of the Events API to create an interactive experience.
Last updated
This guide helps you make a better use of the Events API to create an interactive experience.
Last updated
Events are the main pillar that signals an interaction between your customers/consumers and Gameball. An event could be anything that describes an action that the customer does, for example in case of an e-commerce platform, an event could simply be visiting a product page, a customer adding an item to his cart, or could be a more complex one such as placing an order. Furthermore, an event could be a physical one tracked through any digital medium; such as an app with a QR code scanner to track “entering a room” event for instance.
In this tutorial we take a look at multiple use cases through which we discuss different scenarios. For example, how you can track various events on different platforms, and further engage your users by configuring tailored event-based rewards campaigns/messages which are handled by Gameball.
The wide variety of events introduces a huge pool of possibilities that we can make use of in our Gameball event engine to enhance your customers' experience. The below figure illustrates in a nutshell how the user interaction with your system is translated into events to be sent to Gameball.
Before we dive in, you may find it useful to take a look at the following API(s) that will be used throughout this tutorial, where we will demonstrate how each one can contribute to better track your customers' events.
In this tutorial we explore the following use cases:
Assuming you have an e-commerce store and you need to simply keep track of an Add-to-Cart event. Tracking such events could help you configure specific cart related rewards campaigns or send customized messages to your customers. We will dive - step by step - into how to send an event to Gameball and make use of such events to build an interactive experience.
Let’s say you need to send Gameball information whenever a customer adds a product to his cart. In this example, we assume that you’re tracking a customer who’s adding an “iPhone 12” to his cart. First of all, let’s start by simply sending the “Add-to-Cart” event to Gameball.
On clicking “Add to Cart”, that’s how the event's request body - to be sent to Gameball - should look like in this case:
After sending the above event, Gameball now knows that your customer “user_123” has triggered an “add_to_cart” event. You can make use of tracking the above event by linking this event with customized rewards campaigns or messages, for example a “Cart Ninja” rewards campaign whenever a user adds 10 products to their cart for the first time.
Now, you might want to enrich your data a little by adding additional information to the add-to-cart event. Gameball enables you to build a better, more interactive experience for your customers by configuring customized rewards campaigns or sending out relevant messages to them. In order to achieve such an experience, you may find it useful to send additional information along with your event body that better describes the event. The more metadata you send with the event gives you more liberty and options to design your engaging and interactive experience. Some useful information could be the product_id, category, price, etc.. .
In such case your event body should for example, look like this:
Now, having this extra information, the next step would be to play around with such information a little to configure a certain rewards campaign. For example an “Apple Top Fan” rewards campaign, for the first time a customer adds to their cart a product sold by “Apple”.
In order to achieve that, you should navigate to Gameball admin dashboard, go to Programs → Campaign → Rewards → Create New Rewards Campaign , and configure the described rewards campaign as follows:
Now, let’s make use of this additional information to send your customer a customized message, for example “Save up to 6% of the total order price if you also added a charger with your order”. In such case, this message is to be sent to the user when the added item to the cart is sold by “Apple” and belongs to the “Mobile Phones” category, making use of the vendor property sent with the event body.
As a result, you will need to add a category property to make sure it belongs to the “Mobile Phones” category to be able to configure your rewards campaign accordingly.
In this case, the “add_to_cart” event payload will look like this:
In order to create this customized message, navigate to Messages → Customer Messages → Add New Customer Message, and start composing your message as follows:
Then you will have to identify the message trigger as Event, and select your configured event “add_to_cart”; specifying the rule based on which the customer should receive the message.
After that, the customer will now receive the message when the event is triggered.
A more challenging use case for the above example, would be to send a message for your user upon adding a product with category “Mobile Phones” and sold by “Apple” with price above 1200 USD.
Let’s assume you own a music streaming service, something like Spotify for example. There could be many possible ways on how you can track your customer's events on a streaming service. For instance, you need to reward a user for liking 10 songs. In order to be able to track such activity you need to trigger an event and send its details upon hitting the like button.
In such case, you would need to send an event with related details to Gameball to be able to track such event using the following payload:
In the above event details, other rewards campaigns could be configured using the above example. For instance, let’s assume this album is new and your goal is to boost the listening count of this album, so you may find it useful to create a rewards campaign if a user likes for example 3 songs of the album to complete a “Rosie’s Cheerleader” (name of the artist) rewards campaign .
In this case the configured rewards campaign will look like this:
Assuming your goal is to track a physical event such as a TEDx event. Tracking this event is to be achieved using for instance a mobile app for your users to register for that event, get information about the event's timeline, number of sessions, duration, speakers, sponsors and so on.
Assume you have a scannable QR code on each session's room, through which your mobile app would be able to check and track your attendees' attendance.
A possible scenario is to boost your attendees engagement with the sessions, which take place in different rooms. For example, you need to motivate attendees to attend a certain session in the event. Accordingly, you can configure a rewards campaign upon the event of attending this session specifically.
To track such an event we may assume that using a QR code and a mobile device of a registered attendee on your app, this event could be sent upon scanning the QR code before entering that specific session room.
Let’s assume that upon scanning the QR code you can capture some relevant information, such as attendee’s entrance time, attendee’s departure time, session duration etc.. .
You can make use of the above information and configure a rewards campaign for any attendee, who attended three different sessions that belong to a specific category, for instance an “AI Warrior” for an attendee who attended 3 sessions belonging to the “AI” category.
You can now send Gameball the “attend_session” event, The event payload in this case could possibly be as follows: