You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/klaviyo/index.md
+39-38Lines changed: 39 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,21 @@ rewrite: true
4
4
cmode-override: true
5
5
id: 54521fd825e721e32a72eec8
6
6
---
7
-
[Klaviyo](https://www.klaviyo.com/features/overview) is a powerful email platform focused on ecommerce that helps companies make more money. It supports segmentation based on category and event triggers like product bought, page viewed, email engagement, or amount spent.
7
+
[Klaviyo](https://www.klaviyo.com/features/overview){:target="_blank"} is a powerful email platform focused on ecommerce that helps companies make more money. It supports segmentation based on category and event triggers like product bought, page viewed, email engagement, or amount spent.
8
8
9
9
It measures opens, clicks, revenue generated, breakdown of generated revenue based on custom attributes (like campaign type or amount gained per recipient), and provides trend reports, cohort analysis, and subscriber growth
10
10
11
-
Ultimately, Klaviyo lets you send personalized newsletters, automates triggered emails, product recommendations, welcome campaigns, order announcements, push notifications and sync your data to Facebook custom audiences.
11
+
Klaviyo lets you send personalized newsletters, automates triggered emails, product recommendations, welcome campaigns, order announcements, push notifications and sync your data to Facebook custom audiences.
12
12
13
13
To configure Klaviyo as an Event Source to get data into your warehouse or other downstream tools, see the [Klaviyo Source](/docs/connections/sources/catalog/cloud-apps/klaviyo/) documentation.
14
14
15
-
## Getting Started
15
+
## Getting started
16
16
17
17
{% include content/connection-modes.md %}
18
18
19
19
1. From the Segment web app, click **Catalog**.
20
20
2. Search for "Klaviyo" in the Catalog, select it, and choose which of your sources to connect the destination to.
21
-
3. Navigate to your [Account > Settings > API Keys](https://www.klaviyo.com/account#api-keys-tab){:target="_blank"} in the Klaviyo's UI and copy your "API Key" into the Segment Settings UI.
21
+
3. Navigate to [Account > Settings > API Keys](https://www.klaviyo.com/account#api-keys-tab){:target="_blank"} in Klaviyo's UI and copy your API Key into the Segment Settings UI.
22
22
4.**Note:** Klaviyo requires the Private API Key to use the List API. You can find this by going to Klaviyo's UI and clicking [Account > Settings > API Keys > Create API Key](https://www.klaviyo.com/account#api-keys-tab){:target="_blank"} to generate a Private API Key and copy it into the Segment Settings UI.
23
23
24
24
## Identify
@@ -35,14 +35,14 @@ analytics.identify({
35
35
})
36
36
```
37
37
38
-
### Clientside Identify
38
+
### Client-side Identify
39
39
40
40
When you call `identify` on analytics.js, Segment calls Klaviyo's `identify` with the `traits` object. Segment then augments the `traits` object to have `traits.$id` be the `userId` since Klaviyo takes the user ID on the `traits` object itself.
41
41
42
42
> info ""
43
43
> When you send data to Klaviyo using `analytics.js`, an initial `page` call is required. By default, this is already added in your [Segment snippet](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet).
44
44
45
-
The following Segment spec'd traits map to Klaviyo [special people properties](http://www.klaviyo.com/docs):
45
+
The following Segment spec'd traits map to Klaviyo [special people properties](http://www.klaviyo.com/docs){:target="_blank"}:
46
46
47
47
| Segment Traits | Klaviyo Traits |
48
48
| -------------- | --------------- |
@@ -53,11 +53,11 @@ The following Segment spec'd traits map to Klaviyo [special people properties](h
53
53
|`lastName`|`$last_name`|
54
54
|`title`|`$title`|
55
55
56
-
### Serverside Identify
56
+
### Server-side Identify
57
57
58
58
When you call `identify` from a mobile or server-side library, Segment creates or updates a Klaviyo person with the `traits` you provide in the `identify`.
59
59
60
-
If your `userId` is an email, or you provide an email in `traits.email`, Segment sends it as the `$email` property to Klaviyo. The following Segment spec'd traits map to Klaviyo [special people properties](http://www.klaviyo.com/docs):
60
+
If your `userId` is an email, or you provide an email in `traits.email`, Segment sends it as the `$email` property to Klaviyo. The following Segment spec'd traits map to Klaviyo [special people properties](http://www.klaviyo.com/docs){:target="_blank"}:
61
61
62
62
| Segment Traits | Klaviyo Properties |
63
63
| ------------------- | ------------------ |
@@ -74,21 +74,21 @@ If your `userId` is an email, or you provide an email in `traits.email`, Segment
74
74
|`timezone`|`$timezone`|
75
75
|`zip`|`$zip`|
76
76
77
-
#### Enforce Email as Primary Identifier
77
+
#### Enforce email as primary identifier
78
78
79
-
If this option is enabled, we will never set `$id` field to your `userId` when you call ``.identify()`` or ``.track()``. Instead, we will only set a custom attribute `id` and only set `$email` as the primary identifier with your `traits.email` or `properties.email`. You should be careful when enabling this option and understand its full implications. This should only be enabled if you are experiencing an issue with duplicate profiles being created inside Klaviyo.
79
+
If this option is enabled, Segment won't set the `$id` field to your `userId` when you call ``.identify()`` or ``.track()``. Instead, Segment will set a custom attribute `id` and only set `$email` as the primary identifier with your `traits.email` or `properties.email`. You should be careful when enabling this option and understand its full implications. This should only be enabled if you are experiencing an issue with duplicate profiles being created inside Klaviyo.
80
80
81
81
#### Fallback on Anonymous ID
82
82
83
83
Server side `identify` calls require a `userId` unless you enable sending anonymous data. Enable this option to fallback on `anonymousId` if `userId` is not available when sending server side events. Note that this option may result in superfluous user profiles in Klaviyo and is generally not recommended.
84
84
85
85
#### Adding users to a list
86
86
87
-
When you call `identify` using a **server side** library, you can optionally send list data in order to add that person to a specific List in Klaviyo. We will use their [List API](https://www.klaviyo.com/docs/api/lists).
87
+
When you call `identify` using a **server side** library, you can optionally send list data in order to add that person to a specific Klaviyo List. Segment will use [Klaviyo's List API](https://www.klaviyo.com/docs/api/lists){:target="_blank"}.
88
88
89
-
In order for this to work, you must add the **Private Key** inside the Klaviyo settings in Segment. You can generate a private key by clicking `Account > Settings > API Keys > Create API Key` inside Klaviyo.
89
+
For this to work, you must add the **Private Key** inside the Klaviyo settings in Segment. You can generate a private key by clicking `Account > Settings > API Keys > Create API Key` inside Klaviyo.
90
90
91
-
You can choose to provide a default `listId` that we can fallback on when adding users to a list. If you'd like to override this default `listId`, you can also do so by sending it manually using code in `integrations.Klaviyo.listId`.
91
+
You can choose to provide a default `listId` that Segment can fall back on when adding users to a list. If you'd like to override this default `listId`, you can also do so by sending it manually using code in `integrations.Klaviyo.listId`.
92
92
93
93
**Important**: You must provide an `email` in your `traits` or send `email` as the `userId`. Be sure to provide the `Private Key` in the Klaviyo settings for this to work.
94
94
@@ -112,17 +112,18 @@ analytics.identify({
112
112
});
113
113
```
114
114
115
-
#### Confirm Optin
115
+
#### Confirm opt in
116
116
117
-
You can also choose whether you want to force users to confirm the optin to your list. This flag determines whether someone is sent an email with a confirmation link before they are added to the list. The default settings will be `true`. However, you can uncheck this option in the Klaviyo settings inside Segment or override it per `identify` call using code in the `integration.Klaviyo.confirmOptin` parameter.
117
+
You can also choose whether you want to force users to confirm the opt in to your list. This flag determines whether someone is sent an email with a confirmation link before they are added to the list. The default settings will be `true`. However, you can uncheck this option in the Klaviyo settings inside Segment or override it per Identify call using code in the `integration.Klaviyo.confirmOptin` parameter.
118
118
119
-
**Note:** This setting should only be set to `false` or unchecked if you have already received explicit permission from that person to add them to this list. Inappropriately setting `Klaviyo.confirmOptin` to `false` without explicit permission of the people added can result in your Klaviyo account being suspended and/or terminated by Klaviyo.
119
+
> warning ""
120
+
> This setting should only be set to `false` or unchecked if you have already received explicit permission to add a user to the list. Setting `Klaviyo.confirmOptin` to `false` without explicit user permission can result in your Klaviyo account being suspended and/or terminated by Klaviyo.
120
121
121
122
## Track
122
123
123
124
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like:
124
125
125
-
```
126
+
```js
126
127
analytics.track({
127
128
userId:'user123',
128
129
event:'Item Added',
@@ -135,42 +136,42 @@ analytics.track({
135
136
})
136
137
```
137
138
138
-
### Clientside Track
139
+
### Client-side Track
139
140
140
-
When you call `track` on `analytics.js`, we call Klaviyo's `track` with the same parameters.
141
+
When you call `track` on `analytics.js`, Segment calls Klaviyo's `track` with the same parameters.
141
142
142
-
### Serverside Track
143
+
### Server-side Track
143
144
144
-
When you call `Track`from one of our mobile or server-side libraries, we will key the user using the `userId`, but we will also provide the Klaviyo `$email``customer_property` if your `userId` is an email, or you provide `email` as one of your event `properties`.
145
+
When you call make a Track call from one of Segment's mobile or server-side libraries, Segment keys the user with the `userId` and also provides the Klaviyo `$email``customer_property` if your `userId` is an email, or you provide `email` as one of your event `properties`.
145
146
146
-
We will also map the following Segment spec'd properties to Klaviyo's [special people properties](http://www.klaviyo.com/docs):
147
+
Segment also maps the following Segment spec'd properties to Klaviyo's [special people properties](http://www.klaviyo.com/docs){:target="_blank"}:
147
148
148
149
### Ecommerce
149
150
150
-
The below table shows the out of the box mappings in our integration between our e-commerce spec and Klaviyo's spec:
151
+
The following table shows the out of the box mappings in Segment's integration between the Segment e-commerce spec and Klaviyo's spec:
151
152
152
-
|**Segment Ecommerce Spec | Klaviyo Standard Event**|
The below table shows the parameter mappings in our integration between Order Completed properties and and Klaviyo's standard properties:
157
+
The following table shows the parameter mappings in Segment's integration between Order Completed properties and and Klaviyo's standard properties:
157
158
158
-
|**Segment Properties | Klaviyo Properties**|
159
-
| ---------------------- | --------------------|
160
-
|`revenue`|`$value`|
161
-
|`eventId` or `orderId`|`$event_id`|
159
+
| Segment Properties | Klaviyo Properties |
160
+
| ---------------------- | ------------------ |
161
+
|`revenue`|`$value`|
162
+
|`eventId` or `orderId`|`$event_id`|
162
163
163
-
#### Order Completed
164
+
#### Order completed
164
165
165
-
Klaviyo supports the `Order Completed` event that is outlined in our[specs](/docs/connections/spec/ecommerce/v2/#order-completed). If you send us a`Order Completed` event, we will send Klaviyo a `Placed Order` event and a `Ordered Product` event for each item listed in the `properties.products` array. We will also attach`customer_properties` with the `userId` set as `$id` for each of those Klaviyo events.
166
+
Klaviyo supports the `Order Completed` event that is outlined in Segment's[specs](/docs/connections/spec/ecommerce/v2/#order-completed). If you send Segment an`Order Completed` event, Segment sends Klaviyo a `Placed Order` event and a `Ordered Product` event for each item listed in the `properties.products` array. Segment also attaches`customer_properties` with the `userId` set as `$id` for each of those Klaviyo events.
166
167
167
-
While it is not included in our spec for a `Order Completed` event, you can optionally include a `productUrl` and or `imageUrl` as a property of an item inside the `products` array. We will pass those along to Klaviyo as `Product URL` and `Image URL` respectively.
168
+
Though not included in the Segment spec for a `Order Completed` event, you can optionally include a `productUrl` and or `imageUrl` as a property of an item inside the `products` array. Segment will pass those along to Klaviyo as `Product URL` and `Image URL` respectively.
168
169
169
170
Each auto-generated `Ordered Product` event requires a unique `$event_id`, which Segment automatically generates based on a combination of the `orderId` of the parent `Order Completed` event, and the `productId`, `id` or `sku` of the product itself (in this order). In other words, you must pass either a `productId`, `id` or `sku` to Segment, or Klaviyo will reject your `Ordered Product` events.
170
171
171
-
An example `Order Completed` event may look like this using the [node.js library](/docs/connections/sources/catalog/libraries/server/node/):
172
+
The following example shows an `Order Completed` event that uses the [node.js library](/docs/connections/sources/catalog/libraries/server/node/):
172
173
173
-
```
174
+
```js
174
175
analytics.track({
175
176
userId:'019mr8mf4r',
176
177
event:'Order Completed',
@@ -208,6 +209,6 @@ analytics.track({
208
209
});
209
210
```
210
211
211
-
##### Send Placed Order Events as Order Completed
212
+
##### Send placed order events as order completed
212
213
213
-
Enable this setting if you'd like to send `Order Completed` events as is rather than changing the event name to `Placed Order` on the server side (client side always sends Order Completed). It is recommended that you keep this setting enabled so that both client and serverside Klaviyo integration sends the same event for `Order Completed`. Klaviyo does not treat the event names differently in their backend feature wise. This option was introduced to bridge the existing disparity between our client and serverside integration regarding how this event name is sent without forcibly breaking the current behavior.
214
+
Enable this setting if you'd like to send `Order Completed` events as is rather than changing the event name to `Placed Order` on the server side (client side always sends `Order Completed`). Segment recommendeds that you keep this setting enabled so that both client- and server-side Klaviyo integrations send the same event for `Order Completed`. Klaviyo does not treat the event names differently in their backend feature wise. This option was introduced to bridge the existing disparity between Segment client- and server-side integrations regarding how this event name is sent without forcibly breaking the current behavior.
0 commit comments