1. 程式人生 > >Iterable Destination Documentation

Iterable Destination Documentation

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

Getting Started

When you switch on the Iterable destination in your Segment dashboard, your data will start flowing into Iterable, which will trigger workflows and be available for analytics. You can locate your Iterable API key by going to Destinations → API Keys inside the Iterable app.

Identify

When you call identify with one of Segment’s sources, we’ll call Iterable’s update user endpoint, to add data for that particular user. All users are keyed by email or userId in Iterable. If you do not include a userId or an email, the call will throw an error!

You can also call identify to update user fields. If you need to update the user’s email address in Iterable, you will need to call their

/users/updateEmail API directly.

Example steps:

  1. First, identify with both userId and email.
  2. Subsequent identify events need only userId.

Merge Nested Objects

Iterable offers the option to either merge user fields with nested data or overwrite them. (see their docs for more info). By default, this option is set to false. If you wish to disable this, you can pass an destination specific property called mergeNestedObjects

and set it’s value to true.

Here’s an example:

analytics.identify({
    userId: 'user-id',
    traits: {
        settings: {
            mobile: true
        }
    },
    integrations: {
        Iterable: {
            mergeNestedObjects: true
        }
    }
});

This identify event would merge the mobile property for this user with any other settings that were previously a part of that users settings field.

Track

When you call track with one of Segment’s sources, we’ll call Iterable’s track API endpoint, and send over the event properties as the data fields in the request. The name of the track event will show up as a Custom Event in Iterable, and will be available to trigger workflows, segment users, and view analytics.

If a user does not already exist in Iterable, calling track for a user event will add that user into the system. You can track with either an email or userId (if a userId exists for that email).

Example steps:

First track event with userId and email; user will be created

Subsequent track with userId

Ecommerce

Iterable also supports Segment’s ecommerce events. This works just as you would expect, using the track method.

Note: there is one important difference from the Segment documentation. If you are using the Product Added / Product Removed events, you will need to also pass along the “products” field with your cart info, just like Segment’s example for the Order Completed event. You must include all required fields for the Purchase events in Iterable, which includes the total value of the purchase with the property: total. This value works best as a float, double, and possibly an integer. An example might look like this:

analytics.track("Order Completed", {
  total: 100.00
});

Page

Calling page to track pageviews will register as a custom event within Iterable. If you have a page called “shoppingCart” the custom event will be called “shoppingCart page” within Iterable.

If a user does not already exist in Iterable, calling page for a user event will add that user into the system. Be sure to pass in the email the first time you call page for a user, since Iterable keys users by email. After the first time, you can call page with userId.

Example steps:

Call page with userId and email; if with email and the email doesn’t exist, the user will be created.

Sending Email Data from Iterable

Iterable supports sending email events to other tools on the Segment platform. These events will be sent as track calls to the other destinations you’ve turned on.

To enable this feature, go to Destinations, Third Party, and select Segment in the Add Destinations button. Then, enter your API key.

Send email events from Iterable

Sending Push Notification Data from Iterable

Iterable supports sending push notification events to Segment. These events will be sent as track calls to the other destinations you’ve turned on. Push events will be automatically enabled once the Email Source is enabled.

They support the following events: Push Delivered, Push Bounced, Mobile App Uninstalled, Push Opened

Personas

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

WebMobileServer