Skip to content

Commit 747d666

Browse files
committed
Clean up Klaviyo Destination #2755
1 parent 058c4bc commit 747d666

File tree

1 file changed

+39
-38
lines changed
  • src/connections/destinations/catalog/klaviyo

1 file changed

+39
-38
lines changed

src/connections/destinations/catalog/klaviyo/index.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ rewrite: true
44
cmode-override: true
55
id: 54521fd825e721e32a72eec8
66
---
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.
88

99
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
1010

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.
1212

1313
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.
1414

15-
## Getting Started
15+
## Getting started
1616

1717
{% include content/connection-modes.md %}
1818

1919
1. From the Segment web app, click **Catalog**.
2020
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.
2222
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.
2323

2424
## Identify
@@ -35,14 +35,14 @@ analytics.identify({
3535
})
3636
```
3737

38-
### Client side Identify
38+
### Client-side Identify
3939

4040
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.
4141

4242
> info ""
4343
> 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).
4444
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"}:
4646

4747
| Segment Traits | Klaviyo Traits |
4848
| -------------- | --------------- |
@@ -53,11 +53,11 @@ The following Segment spec'd traits map to Klaviyo [special people properties](h
5353
| `lastName` | `$last_name` |
5454
| `title` | `$title` |
5555

56-
### Server side Identify
56+
### Server-side Identify
5757

5858
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`.
5959

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"}:
6161

6262
| Segment Traits | Klaviyo Properties |
6363
| ------------------- | ------------------ |
@@ -74,21 +74,21 @@ If your `userId` is an email, or you provide an email in `traits.email`, Segment
7474
| `timezone` | `$timezone` |
7575
| `zip` | `$zip` |
7676

77-
#### Enforce Email as Primary Identifier
77+
#### Enforce email as primary identifier
7878

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.
8080

8181
#### Fallback on Anonymous ID
8282

8383
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.
8484

8585
#### Adding users to a list
8686

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"}.
8888

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.
9090

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`.
9292

9393
**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.
9494

@@ -112,17 +112,18 @@ analytics.identify({
112112
});
113113
```
114114

115-
#### Confirm Optin
115+
#### Confirm opt in
116116

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.
118118

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.
120121
121122
## Track
122123

123124
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:
124125

125-
```
126+
```js
126127
analytics.track({
127128
userId: 'user123',
128129
event: 'Item Added',
@@ -135,42 +136,42 @@ analytics.track({
135136
})
136137
```
137138

138-
### Client side Track
139+
### Client-side Track
139140

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.
141142

142-
### Server side Track
143+
### Server-side Track
143144

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`.
145146

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"}:
147148

148149
### Ecommerce
149150

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:
151152

152-
| **Segment Ecommerce Spec | Klaviyo Standard Event** |
153-
| ------------------------ | ------------------------ |
154-
| `Order Completed` | `Ordered Product` |
153+
| Segment Ecommerce Spec | Klaviyo Standard Event |
154+
| ---------------------- | ---------------------- |
155+
| `Order Completed` | `Ordered Product` |
155156

156-
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:
157158

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` |
162163

163-
#### Order Completed
164+
#### Order completed
164165

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.
166167

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.
168169

169170
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.
170171

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/):
172173

173-
```
174+
```js
174175
analytics.track({
175176
userId: '019mr8mf4r',
176177
event: 'Order Completed',
@@ -208,6 +209,6 @@ analytics.track({
208209
});
209210
```
210211

211-
##### Send Placed Order Events as Order Completed
212+
##### Send placed order events as order completed
212213

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 server side 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 server side 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

Comments
 (0)