WebEngage Destination

Segment makes it easy to send your data to WebEngage (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to WebEngage in the format they understand. Learn more about how to use WebEngage with Segment.

This integration is maintained by WebEngage Support.

Getting Started

Steps to integrate Segment with WebEngage:

You will be required to provide the API key if you intend on sending any via WebEngage’s server-side component. The API key can be found in your WebEngage dashboard on the top right under Integrations > REST API. If you don’t have a WebEngage account, you can create one here.

If you’d like to use leverage the client-side web or mobile bundled SDKs, please enter your License Code. WebEngage only needs the License Code you want to enable the device/packaged Integration which will allow you to leverage WebEngage’s in-app and push notification functionality.

Do note that WebEngage for Mobile supports only the Identify and Track methods.


To install the WebEngage-Segment integration, simply add this line to your app’s build.gradle file:

 compile 'com.webengage:android-segment:2.+'

After adding the dependency, you must register the WebEngage’s destination in your Segment’s Analytics instance. To do this, import the WebEngage integration:

 import com.webengage.sdk.android.integrations.segment.WebEngageIntegration;

And add the following line:

analytics = new Analytics.Builder(this, "YOUR_SEGMENT_WRITE_KEY")


To install the Segment-WebEngage integration, simply add this line to your CocoaPods Podfile:

pod "Segment-WebEngage"

If you are using XCode 8 and face any build issues try following before contacting support:

pod "Segment-WebEngage/Xcode8"

After adding the dependency, you must register the integration with our SDK. To do this, import the WebEngage integration in your AppDelegate:

#import <Segment-WebEngage/WEGSegmentIntegrationFactory.h>

And add the following lines to your AppDelegate’s application:didFinishLaunching:WithOptions: method

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    //Initialise Segment
    SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"XXXXXXXXXXXXXXXXXXXXXXXXXXX"];

    //Additional Segment Configuration
    configuration.trackApplicationLifecycleEvents = NO; // Enable this to record certain application events automatically!
    configuration.recordScreenViews = NO; // Enable this to record screen views automatically!

    //Register WebEngage Integration With Segment
    [configuration use:[WEGSegmentIntegrationFactory instanceWithApplication:application launchOptions:launchOptions]];

    [SEGAnalytics setupWithConfiguration:configuration];

    return YES;


This is only supported on the client side web component. Sending page events via server side integration is not supported.


When a user is identified, Segment will send that user’s information to WebEngage, wherein a user will be created/updated. The anonymousId must be present in case of an anonymous user and userId in case of an identified user. We will map semantic traits such as your first name, email, gender, etc and also send along any custom traits.


When you track an event, Segment will send that event and its properties to WebEngage. Each event will have the necessary data about the user (anonymousId and userId) who performed the event.

An event name can be maximum 50 characters long. Event attribute values can be booleans, numbers, strings and dates only. The maximum length of attribute names is 50 characters and of String data type attribute values is 1000 characters.

You cannot start your event or event attribute names with we_.

In an account, events can have at most 25 attributes of each data type type (i.e. 25 String type attributes, 25 Number type attributes etc.) across all instances of a particular event.


The reset call must be invoked when a user is logged out.


Push Notifications

Please follow WebEngage’s push notification documentation:

In-App Notifications

No further action is required to enable in-app messaging.


Include the following rules in your ProGuard file.

 -keep class com.webengage.sdk.android.**{*;}
-dontwarn com.webengage.sdk.android.**


You can send computed traits and audiences generated through Segment Personas to this destination as a user property. To learn more about Personas, reach out for a demo.

For user-property destinations, an identify call will be sent to the destination for each user being added and removed. The property name will be the snake_cased version of the audience name you provide with a true/false value. For example, when a user first completes an order in the last 30 days, we will send an identify call with the property order_completed_last_30days: true, and when this user no longer satisfies we will set that value to false.

When the audience is first created an identify call is sent for every user in the audience. Subsequent syncs will only send updates for those users which were added or removed since the last sync.

Supported Sources and Connection Modes

📱 Device-mode
☁️ Cloud-mode

To learn more about about Connection Modes and what dictates which we support, see here.

Segment offers an optional Device-mode for Mobile data with WebEngage. If you’d like to use features that require client-based functionality, follow the steps above to package the WebEngage SDK with Segment’s.


Segment lets you change these destination settings via your Segment dashboard without having to touch any code.


Required if you are sending data to WebEngage via their server-side component.

License Code

Required only if you are loading WebEngage client side on your web browser or via the bundled mobile SDKs. You can find your License Code in your WebEngage account.

Adding WebEngage to the integrations object

To add WebEngage to the integrations JSON object (for example, to filter data from a specific source), use one of the 1 valid names for this integration:
  • WebEngage

  • Questions? Need help? Contact us!
    Can we improve this doc?
    Email us: docs-feedback@segment.com!