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

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

Event tracking lets you track user activities in your application and tie them to the corresponding engagement campaigns or to trigger an in-app notification.

All Analytics/Events related API's are part of WebEngage Android SDK's Analytics Object.

You get an instance of WebEngage Analytics object as follows:

// import WebEngage 'Analytics'
import com.webengage.sdk.android.Analytics;

// Get an instance of `Analytics` object
Analytics weAnalytics = WebEngage.get().analytics();

After WebEngage has been successfully initialized you can track an event by using following apis on Analytics Object:

Event Tracking API

weAnalytics.track(String eventName)

weAnalytics.track(String eventName, Map<String,Object> attributes)

None of the event name should start with we_,else they will be ignored. Event name starting with we_ are reserved for WebEngage internal uses.

The upper bounds on attribute name and value(in case of String) are 50 and 1000 chars respectively.Anything beyond that will be truncated.

Data Types

Following are the data types which are allowed for event attributes. Attribute having any other data type would be rejected by SDK.

  • String
  • Integer
  • Long
  • Double
  • Boolean
  • Date
  • List
  • Map

Events