Documentation
NAV Navbar
Segment

Installing with Segment

// If you don't want to identify user by the custom user id...
analytics.identify({ email: "USER_EMAIL", createdAt: UNIX_TIMESTAMP_OR_ISO-8610_DATE_STRING });

// ...or with custom id
analytics.identify("user_id", { email: "USER_EMAIL", createdAt: UNIX_TIMESTAMP_OR_ISO-8610_DATE_STRING });

// With additional properties
analytics.identify("user_id", { email: "USER_EMAIL", createdAt: UNIX_TIMESTAMP_OR_ISO-8610_DATE_STRING, custom_property: "custom_property", another_custom_property: "another_custom_property" });

While many customers choose to get started with InMoment (formerly Wootric) by directly installing our Javascript Snippet, there are certain cases where it might make sense to install us using Segment.

  1. Development resources are limited and you’d like a “no-coding required” way to get InMoment (formerly Wootric) integrated into your site.

  2. You use a number of different services supported by Segment.com and you send the same data to them that you would send to us (things like email address of a user, or user created_at date).

Visit Segment to get started.

Refer to InMoment (formerly Wootric) Destination for help with setting it up.

IMPORTANT
Wootric integration is available as a “web browser” integration only i.e. you need to use Analytics.js library to integrate our product using Segment.

Note: When using Segment to integrate Wootric, options available within identify call are: email, createdAt, properties and language.

Idenfity

analytics.identify('userId123', {
  email: 'hello@example.com',
  createdAt: '2018-08-03T15:28:46.493Z',
  language: 'EN'
});

If you’re not familiar with the Segment Specs, take a look to understand what the Identify method does.

When you call Identify, the user’s information is passed to InMoment to check eligibility during survey responses. Segment’s special traits recognized as InMoment’s standard user profile fields (in parentheses) are:

Segment Parameter InMoment Parameter Description
email wootricSettings.email The email of this user.
createdAt wootricSettings.created_at ISO 8610 timestamp. InMoment requires the timestamp to be rounded to the nearest second so we will make this conversion for you.
language wootricSettings.language Language for the survey

Track

analytics.track();

When you call Track, the user’s information is passed along with the event name to InMoment to check eligibility during survey responses.

Note: this only works if you enable Targeted Sampling in your InMoment account. The event name must be exactly the same as the one used in the Track call.

Page

analytics.page();

If you aren’t familiar with the Segment Spec, you should first read about what the Page method does. An example call would look like:

Segment sends Page calls to InMoment as a pageview.

When you call Page, InMoment tracks the URL, page name, and page path that you are currently on. You can use this information in the InMoment Settings to trigger surveys by using InMoment’s Targeted Sampling feature. InMoment recognizes the following Segment Page properties as the following page fields:

Segment Parameter InMoment Parameter Description
name wootricSettings.email The name assigned to this page.
path wootricSettings.page_info.path The path portion of the URL of the page. Equivalent to the canonical path which defaults to location.pathname from the DOM API.