Introduction
Segment is a customer data platform that helps you collect, clean, and activate your customer data.
If you are already using MoEngage as a Destination on Segment - MoEngage (Actions) Destination provides significant improvements over the Classic Destination.
Benefits of MoEngage (Actions) vs MoEngage Classic
MoEngage (Actions) provides the following benefits over the MoEngage Classic destination:
- Data Consistency. Data consistency between device-mode and cloud-mode. Earlier, data sent from device and cloud-mode would sometimes be mismatched with duplicated properties - this has now been fixed.
- Mapping Support. Using MoEngage Actions, you can now map incompatible properties with MoEngage-compatible properties. This significantly reduces your development bandwidth.
- Region Support. Support across all data clusters. MoEngage provides an option to choose your Data Region where your app is present.
- Better Configuration. There are additional configurations for the JavaScript integration like custom Service Worker.
Integration
library_add_check |
Prerequisites
|
Step 1: Add MoEngage as a destination
- Login to your segment app.
- On your Segment App Dashboard, click on "Add Destination".
- From the Destinations Catalog, search for "MoEngage (Actions)" and click on it.
- On the App Description Page, click on "Configure MoEngage (Actions)" button.
- Select a Data Source and click Next.
-
On the Setup Page, enter a Destination name, and select how you want to set it up. Click Save when done.
- If you have already integrated with the MoEngage destination before, you can choose to copy the previous settings here.
- On the Settings tab, enter the details of your MoEngage App.
Field | Description |
---|---|
Name | Name of the MoEngage destination such as MoEngage prod, MoEngage test, etc |
App ID |
Copy and paste the Workspace ID. The Workspace ID of your MoEngage account is available in the following navigations in the revamped and old UIs:
The Data API ID and the Workspace ID of your MoEngage account are the same. |
App Key |
Copy and paste the App Key. The Data API key of your MoEngage account is available in the following navigations in the revamped and old UIs:
|
End point region |
This is your MoEngage data center. Read more. |
- Enable the toggle option to Enable destination and click Save changes.
Step 2 - Enable mappings - Track and Identify
MoEngage (Actions) Destination now has support for Data Mapping which improves on classic destinations by enabling you to see and control how Segment sends the event data it receives from your sources to MoEngage. Each Action in MoEngage (Actions) Destination lists the event data it requires, and the event data that is optional.
You can also choose which event types, event names, or event property values trigger an Action. These Triggers and mappings make it possible to send different versions of the Action, depending on the context from which it is triggered.
Read more about the difference between Classic Destinations and Destination Actions here.
To use mappings, go to the Mappings tab and click on New Mapping.
MoEngage (Actions) provides two Actions: Identify and Track.
Add Identify User mapping
info |
Info MoEngage supports importing both Registered and Anonymous Users via Cloud Mode. Make sure to pass at least one of User ID or Anonymous ID. |
- Select Identify User
- You can define the event triggers as per your need, or keep the default condition MoEngage has provided.
- You can click on "Test Event" and Segment will try to fetch a recent event that matches your trigger conditions.
- In the "Define mappings" step, MoEngage provides preset values for all mappings - so you can scroll down and optionally test your connection. Click save when you're sure everything works properly. Make sure that these values remain the same:
Update existing users only
When making an Identity call, you have the option to choose whether to create new users in MoEngage or not. If you select the 'Update existing users only' option and the forwarded user is not already present in MoEngage, then a new user will not be created. If set to "Yes" (true), only the properties of existing users will be updated.
Add Track Event Action
Under the Mappings tab, click on "New Mapping" and select "Track Event".
- You can define the event triggers as per your need, or keep the default condition MoEngage has provided.
- You can click on "Test Event" and Segment will try to fetch a recent event that matches your trigger conditions.
- In the "Define mappings" step, MoEngage provides preset values for all mappings - so you can scroll down and optionally test your connection. Click save when you're sure everything works properly. Make sure that these values remain the same:
Make sure that status is Enabled for both the mappings. If not, you can enable these by changing the toggle in the status column.
Step 3 - Test integration
- Go to Event Tester tab on the segment dashboard
- Test for Track and Identify methods and make sure that you are getting success status here.
- If successful the data would start flowing into your MoEngage account in 3-5 minutes. You can log in to your MoEngage dashboard and go to Test & Debug >> Recent events to verify.
Migration from the classic MoEngage destination
warning |
Segment's Analytics.js 2.0 Required MoEngage (Actions) Destination requires features found in Segment's Analytics.js 2.0. If you are using Web actions and have connected MoEngage (Actions) Destination to a javascript Source, upgrade your Analytics.js (provided by Segment) to ensure compatibility. |