|
2 | 2 | rewrite: true
|
3 | 3 | title: Userlist Destination
|
4 | 4 | ---
|
5 |
| -[Userlist.io](https://userlist.io/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners) allows you to send behavior-based messages to your SaaS users. It's great for onboarding users as well as nurturing them throughout their journey. |
6 | 5 |
|
7 |
| -This destination is maintained by Userlist.io. For any issues with the destination, [contact the Userlist Support team](mailto:[email protected]). |
| 6 | +[Userlist](https://userlist.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners) allows you to send behavior-based messages to your SaaS users. It's great for onboarding users as well as nurturing them throughout their journey. |
8 | 7 |
|
9 |
| -{% include content/beta-note.md %} |
| 8 | +This destination is maintained by Userlist. For any issues with the destination, [contact the Userlist Support team](mailto:[email protected]). |
10 | 9 |
|
| 10 | +{% include content/beta-note.md %} |
11 | 11 |
|
12 | 12 | ## Getting Started
|
13 | 13 |
|
14 | 14 | {% include content/connection-modes.md %}
|
15 | 15 |
|
16 |
| -1. From the Segment web app, click **Catalog**. |
17 |
| -2. Search for "Userlist" in the Catalog, select it, and choose which of your sources to connect the destination to. |
18 |
| -3. Enter the "Push API Key" into your Segment Settings UI which you can find from your [Userlist.io Push API settings](https://app.userlist.io/settings/push). |
| 16 | +1. From the Segment web app, click **Catalog**. |
| 17 | +2. Search for "Userlist" in the Catalog, select it, and choose which of your sources to connect the destination to. |
| 18 | +3. In the Userlist Segment destination settings, enter your Userlist "Push API Key". You can find this key in your [Userlist Push API settings](https://app.userlist.com/settings/push). |
19 | 19 |
|
20 |
| -_**NOTE:** The Userlist.io Destination does not support tracking of anonymous users, so make sure to call `identify` before calling `track`. If you do call `track` on unidentified users, you will receive a 400 error which you can disregard if it was intentional._ |
| 20 | +> info"" |
| 21 | +> **NOTE:** The Userlist Destination does not support tracking of anonymous users, so make sure to call `identify` before calling `track` or `group`. If you do call `track` or `group` on unidentified users, you will receive a 400 error which you can disregard if it was intentional. |
21 | 22 |
|
22 | 23 | ## Identify
|
23 | 24 |
|
24 | 25 | If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example call would look like:
|
25 | 26 |
|
26 |
| - analytics.identify('userId123', { |
27 |
| - |
28 |
| - name: 'John Doe', |
29 |
| - role: 'Owner', |
30 |
| - createdAt: '2019-03-21T12:12:54.735+01:00' |
31 |
| - }); |
| 27 | +```javascript |
| 28 | +analytics.identify('userId123', { |
| 29 | + |
| 30 | + name: 'John Doe', |
| 31 | + role: 'Owner', |
| 32 | + createdAt: '2019-03-21T12:12:54.735+01:00' |
| 33 | +}); |
| 34 | +``` |
32 | 35 |
|
33 |
| -Identify calls will be sent to Userlist.io as user records. If the `userId` is already known, it'll update the user record, otherwise it'll create a new one. |
| 36 | +Identify calls will be sent to Userlist as user records. If the `userId` is already known, it'll update the user record, otherwise it'll create a new one. |
34 | 37 |
|
35 | 38 | Here's how Segment fields map to Userlist users:
|
36 | 39 |
|
37 |
| -| Segment field | Userlist field | Description |
38 |
| -|-------------|---------------|----------- |
39 |
| -| `userId` | `identifier` | The unique identifier for this user. | |
40 |
| -| `traits` | `properties` | Additional properties describing the user. | |
41 |
| -| `traits.email` | `email` | The user's email address. | |
42 |
| -| `traits.createdAt` | `signed_up_at` | The time when the user was created. | |
43 |
| - |
| 40 | +| Segment field | Userlist field | Description | |
| 41 | +| ------------------ | -------------- | ------------------------------------------ | |
| 42 | +| `userId` | `identifier` | The unique identifier for this user. | |
| 43 | +| `traits` | `properties` | Additional properties describing the user. | |
| 44 | +| `traits.email` | `email` | The user's email address. | |
| 45 | +| `traits.createdAt` | `signed_up_at` | The time when the user was created. | |
44 | 46 |
|
45 | 47 | ## Track
|
46 | 48 |
|
47 | 49 | If you're not familiar with the Segment Specs, take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. An example call would look like:
|
48 | 50 |
|
49 |
| - analytics.track('Project created', { |
50 |
| - projectName: 'Party Planning' |
51 |
| - }); |
52 |
| - |
53 |
| -Track calls will be sent to Userlist.io as a new event. You may send additional properties to describe the event in more detail. Both the event name and additional properties will be stored with the event and normalized to snake case (`project_created` and `project_name`) automatically within Userlist.io. |
| 51 | +```javascript |
| 52 | +analytics.track('Project created', { |
| 53 | + projectName: 'Party Planning' |
| 54 | +}); |
| 55 | +``` |
| 56 | + |
| 57 | +Track calls will be sent to Userlist as a new event. You may send additional properties to describe the event in more detail. Both the event name and additional properties will be stored with the event and normalized to snake case (`project_created` and `project_name`) automatically within Userlist. |
| 58 | + |
| 59 | +To associate an event with both a user and a company, please include the company's identifier as `context.groupId` on the Track call: |
| 60 | + |
| 61 | +```javascript |
| 62 | +analytics.track( |
| 63 | + 'Project created', |
| 64 | + { |
| 65 | + projectName: 'Party Planning' |
| 66 | + }, |
| 67 | + { |
| 68 | + context: { |
| 69 | + groupId: 'companyId123' |
| 70 | + } |
| 71 | + } |
| 72 | +); |
| 73 | +``` |
| 74 | + |
| 75 | +## Group |
| 76 | + |
| 77 | +If you're not familiar with the Segment Specs, take a look to understand what the [Group method](https://segment.com/docs/connections/spec/group/) does. An example call would look like: |
| 78 | + |
| 79 | +```javascript |
| 80 | +analytics.group('companyId123', { |
| 81 | + name: 'Segment' |
| 82 | +}); |
| 83 | +``` |
| 84 | + |
| 85 | +| Segment field | Userlist field | Description | |
| 86 | +| ------------------ | -------------- | ------------------------------------------ | |
| 87 | +| `groupId` | `identifier` | The unique identifier for this company. | |
| 88 | +| `traits` | `properties` | Additional properties describing the user. | |
| 89 | +| `traits.name` | `name` | The company's name. | |
| 90 | +| `traits.createdAt` | `signed_up_at` | The time when the user was created. | |
| 91 | + |
| 92 | +Group calls will be sent to Userlist as company records. If the `groupId` is already known, it'll update the company record, otherwise it'll create a new one. |
| 93 | + |
| 94 | +Userlist supports custom properties to describe the relationship between users and groups (such as the user's role in a company). You can pass relationship properties in a Group call by using Userlist specific extensions. |
| 95 | + |
| 96 | +```javascript |
| 97 | +analytics.group( |
| 98 | + 'companyId123', |
| 99 | + { |
| 100 | + name: 'Segment' |
| 101 | + }, |
| 102 | + { |
| 103 | + integrations: { |
| 104 | + Userlist: { |
| 105 | + extensions: { |
| 106 | + relationship: { |
| 107 | + properties: { |
| 108 | + role: 'owner' |
| 109 | + } |
| 110 | + } |
| 111 | + } |
| 112 | + } |
| 113 | + } |
| 114 | + } |
| 115 | +); |
| 116 | +``` |
0 commit comments