Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Tracking events

Any action of interest done by a user is an event. For example, in case of an e-commerce app when a user adds an item to the shopping cart, the app would want to record the "Added to Cart" event along with the product details and price. Events may also be actions carried out by your system in the context of a user, say to track the user's inactivity or to notify departure of a shipment.

Each event has a name and an optional set of attributes describing the event in detail as necessary. An event attribute is a piece of data associated with an event. In the above example, product details and price are the “Added to Cart” event attributes. We recommend you make your events human readable - as an example, you can use a verb in the past tense like “Product Searched” and “Added to Cart”.

Event tracking lets you track user actions in your app, which enables you to create user segments and engagement campaigns based on this activity. We have put together a list of event templates for you to refer to.

Events accumulate over time, and WebEngage sends events in batches periodically to minimize network usage and maximize battery life.

System events

WebEngage starts tracking some events automatically as soon as you integrate the SDK. These are called System Events and they track your users’ interactions with your app and campaigns. System events make it easier to analyze user behavior and optimize your marketing around common business goals such as driving user registrations or purchases. You can use custom events for any other user actions you want to track.

Following is the list of WebEngage system events. sdk_id attribute of these events signifies the SDK. sdk_id is 2 for Android and 3 for iOS.

Event name

App Installed


App Upgraded


App Crashed


App Uninstalled


User Login


User Logout


Campaign Conversion


APNs Registration Failed


Push (Mobile) Sent


Push (Web & Mobile) Accepted


Push (Web & Mobile) Rejected


Push (Mobile) Received


Push (Web & Mobile) Dismiss


Push (Web & Mobile) Impression


Push (Web & Mobile) Click


Push (Mobile) Rating Submitted


Push (Mobile) Carousel Item Viewed


In-app Notification View


In-app Notification Click


In-app Notification Dismiss


Custom events

Custom events enable you to track user actions in your app. All Events related APIs are part of WebEngage iOS SDK's WEGAnalytics object. You get an instance of WebEngage WEGAnalytics object as follows.

// import WebEngage ‘Analytics’
#import <WebEngage/WEGAnalytics.h>

// Get an instance of ‘Analytics’ object
id<WEGAnalytics> weAnalytics = [WebEngage sharedInstance].analytics;


  • Event names must be less than 50 characters long.
  • Event attributes can be of these data types: NSString, NSNumber, NSDate, NSArray.
  • Event attribute names must be less than 50 characters long. NSString type attribute values must be less than 1000 characters long.
  • You cannot start your event or event attribute names with we_.
  • You can create at most 25 event attributes of each data type across all instances of an event.
  • If attribute value is NSArray or NSDictionary, it cannot be used to create user segments. It can only be used to personalize campaigns.

After WebEngage has been successfully initialized, you can track an event as follows.

[weAnalytics trackEventWithName:@"Product - Page Viewed"];

If you want to add attributes to the event you are tracking, you can use NSDictionary to specify them and then attach to the event as follows.

NSDictionary *addedToCartAttributes=@{@"Product ID":@1337,@"Price":@39.80,@"Quantity":@1,@"Product":@"Givenchy Pour Homme Cologne",@"Category":@"Fragrance",@"Currency":@"USD"};
[weAnalytics trackEventWithName:@"Added to Cart" andValue:addedToCartAttributes];

1. Event names are case sensitive.
2. eventName must not start with we_. Event names starting with we_ are reserved for WebEngage's internal use, and will be ignored if used for custom events.
3. For custom events, the first datapoint synced to WebEngage defines the data type for that event attribute in WebEngage. Therefore, data types must be consistent with the data that you want to store for the attribute. If you change the data type later, attribute data will stop flowing to WebEngage.

What's Next

Push messaging

Tracking events