Skip to content

Understanding events in Pushwoosh

Events are intended to record various actions a user performs in the app. Unlike Tags that are used to store flat data (such as country, device model, or installation data), event data is stored historically and can be treated as a history of user behavior rather than a set of information about the device. All the contextual information about the event can be passed as a set of attributes and their values.

Once properly collected, this data can be used to:

  • trigger behavior-based messages;
  • build segments of users who perform a specific action in the app;
  • get insights about user flow, usage metrics, and other statistical data.

Implementation

1. Create events in Pushwoosh Control Panel

All events sent by your app must be created in Pushwoosh first with the set of attributes and their types; otherwise, Pushwoosh will not recognize them.

To create an event, go to the Events section of your Control Panel and press the Add event button. Enter the name and description and add the attributes if needed.

2. Set attributes

All details describing an event are provided with its attributes. Attributes are key/value pairs and can be of 5 different types: integer, string, list, date, and boolean. For example, you can track user logins and collect login credentials (e.g., logged in with Facebook, Google, Twitter, or email), internet connection type (wifi, cellular, unknown), and whether it was successful or not (true or false values) with a single Login event by specifying its attributes as follows:

attributetypevalue
typestringfacebook, google, twitter, email
connectionstringwifi, cellular, unknown
successbooleantrue, false

This event will be recorded in Pushwoosh with attribute values and a timestamp, so later it can be used for building segments, targeting messages, and collecting stats.

3. Call /postEvent API