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/actions-amplitude/index.md
+194-8Lines changed: 194 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
---
2
-
title: Amplitude Actions Destination
2
+
title: Amplitude (Actions) Destination
3
3
hide-boilerplate: true
4
4
hide-dossier: true
5
5
hidden: true
6
6
---
7
+
7
8
{% include content/plan-grid.md name="actions" %}
8
9
9
10
@@ -18,17 +19,17 @@ and conversion.
18
19

19
20
20
21
> success ""
21
-
> **Good to know**: This page is about the [Actions-framework](/docs/connections/destinations/actions/) Amplitude Segment destination, which receives data _from_ Segment. There's also a page about the [non-Actions Amplitude destination](/docs/connections/destinations/catalog/amplitude/), and the [Amplitude Engage Segment source](/docs/connections/sources/catalog/cloud-apps/amplitude-cohorts/), which sends data _to_ Segment!
22
+
> **Good to know**: This page is about the [Actions-framework](/docs/connections/destinations/actions/) Amplitude Segment destination. There's also a page about the [non-Actions Amplitude destination](/docs/connections/destinations/catalog/amplitude/). Both of these destinations receives data _from_ Segment. There's also the [Amplitude Engage Segment source](/docs/connections/sources/catalog/cloud-apps/amplitude-cohorts/), which sends data _to_ Segment!
22
23
23
24
24
-
## Connection Modes for Amplitude Actions destination
25
+
## Connection Modes for Amplitude (Actions) destination
25
26
26
-
The Amplitude (actions) destination does not offer a device-mode connection mode. However if you are using one of Segment's new libraries ([Analytics.js 2.0](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift) or [Kotlin](https://github.com/segmentio/analytics-kotlin)) with the Actions-framework version of the destination, you do not need the device-mode connection.
27
+
The Amplitude (actions) destination does not offer a device-mode connection mode. If you're using one of Segment's new libraries ([Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift) or [Kotlin](https://github.com/segmentio/analytics-kotlin)) with the Actions-framework version of the destination, you do not need the device-mode connection.
27
28
28
-
Most previous deployments of the Amplitude Segment destination only used the device-mode connection to get use the `session_id` tracking feature. In the new Actions-framework Amplitude destination, session ID tracking is built in. This means you don’t need to bundle any software to run on the user’s device, or write any code. It also means that you can use more of the Segment platform features on data going to Amplitude, such as Protocols filtering and transformations, and Personas identity resolution.
29
+
Most previous deployments of the Amplitude Segment destination used the device-mode connection to use the `session_id` tracking feature. The new Actions-framework Amplitude destination, includes session ID tracking by default. This means you don’t need to bundle any software to run on the user’s device, or write any code. It also means that you can use more of the Segment platform features on data going to Amplitude, such as Protocols filtering and transformations, and Personas identity resolution.
29
30
30
31
31
-
Session tracking is only available when using Segment's new libraries: [Analytics.js 2.0](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift) or [Kotlin](https://github.com/segmentio/analytics-kotlin)
32
+
Session tracking is available with Segment's new libraries: [Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift) or [Kotlin](https://github.com/segmentio/analytics-kotlin)
32
33
33
34
34
35
@@ -53,7 +54,7 @@ The Amplitude destination requires that each event include either a Device ID or
53
54
The session tracking is automatically enabled on Javascript sources.
54
55
55
56
56
-
### Enable session tracking for Swift
57
+
### Enable Amplitude session tracking for Swift
57
58
58
59
To enable session tracking in Amplitude when using the [Segment Swift library](https://github.com/segmentio/analytics-swift):
59
60
1. Enable `trackApplicationLifecycleEvents` in your configuration.
@@ -64,7 +65,7 @@ To enable session tracking in Amplitude when using the [Segment Swift library](h
To enable session tracking in Amplitude when using the [Segment Kotlin library](https://github.com/segmentio/analytics-kotlin):
70
71
1. Enable `trackApplicationLifecycleEvents` in your configuration.
@@ -73,3 +74,188 @@ To enable session tracking in Amplitude when using the [Segment Kotlin library](
73
74
```kotlin
74
75
analytics.add(AmplitudeSession())
75
76
```
77
+
78
+
79
+
## Available Amplitude Actions
80
+
81
+
Amplitude supports the following Actions:
82
+
83
+
- Log Event
84
+
- Identify User
85
+
- Map User
86
+
- Group Identify User
87
+
88
+
You can see the Segment event fields Amplitude accepts for each action in the Actions subscription set up page.
89
+
90
+
91
+
## Quick set-up actions
92
+
93
+
By default a new Amplitude (Actions) destination comes with the following subscriptions.
94
+
95
+
You can select these subscriptions by choosing "Quick Setup" when you first configure the destination. You can enable, edit, and disable them from the screen that appears.
| Track Calls | All **track** calls from the connected source | Log Event | Event Type = `event`<br>for example, `Order Completed`|
100
+
| Page Calls | All **page** calls from the connected source | Log Event | Event Type = Viewed `name`<br>for example, `Viewed Homepage`|
101
+
| Screen Calls | All **screen** calls from the connected source | Log Event | Event Type = Viewed `name`<br>for example, `Viewed Homescreen`|
102
+
| Identify Calls | All **identify** calls from the connected source | Identify User ||
103
+
104
+

105
+
106
+
107
+
108
+
## Amplitude’s Log Event Action
109
+
110
+
In the default configuration, the Log Event mapping is triggered when Segment sends a Track call to Amplitude (Actions).
111
+
112
+
{% comment %}
113
+
MZ - 7/26: Niels is validating the update needed to this section based on a comment in PR 1677
114
+
### Order Completed
115
+
116
+
Use the [Order Completed](/docs/connections/spec/ecommerce/v2/#order-completed) event to track revenue with Amplitude. This event records a list of products that a user purchased in a single transaction. This is the best way for sites that have a shopping cart system to track purchases.
117
+
118
+
You can use this event only for data coming from a Cloud-mode [source](/docs/connections/sources/). An `Order Completed` event from mobile using the bundled Amplitude integration will work the same as the standard `track` event documented above.
119
+
120
+
The example below shows an "Order Completed" event with its properties.
When you send an "Order Completed" event from Segment, an "Order Completed" event appears in Amplitude for that purchase. An Amplitude event called "Product Purchased" is also created for each product in the purchase. All event properties, except `products`, are sent as `event_properties` of the Amplitude "Order Completed" event. Information about each product is present *only* on the individual "Product Purchased" events.
160
+
{% endcomment %}
161
+
162
+
### Track Revenue Per Product
163
+
164
+
Amplitude has two different ways to track revenue associated with a multi-product purchase. You can choose which method you want to use using the **Track Revenue Per Product** destination setting.
165
+
166
+
If you disable the setting ("off"), Segment sends a single revenue event with the total amount purchased. Revenue data is added to the Amplitude "Order Completed" event. The "Product Purchased" events do not contain any native Amplitude revenue data.
167
+
168
+
If you enable the setting ("on"), Segment sends a single revenue event for each product that was purchased. Revenue data is added to each "Product Purchased" event, and the "Order Completed" event does not contain any native Amplitude revenue data.
169
+
170
+
Make sure you format your events using the [Track method spec](/docs/connections/spec/track/). You must pass a `revenue` property, a `price` property, and a `quantity` property for each product in the products list.
171
+
172
+
### Send To Batch Endpoint
173
+
174
+
175
+
> info ""
176
+
> This endpoint is available when you send data in Cloud-mode only.
177
+
178
+
179
+
If `true`, events are sent to Amplitude’s `batch` endpoint rather than to their `httpapi` endpoint. Because Amplitude’s `batch` endpoint throttles traffic less restrictively than the Amplitude `httpapi` endpoint, enabling this setting can help to reduce 429 errors (throttling errors) from Amplitude.
180
+
181
+
Amplitude’s `batch` endpoint throttles data when the rate of events sharing the same `user_id` or `device_id` exceeds an average of 1,000/second over a 30-second period. See the Amplitude documentation for more about [429 errors and throttling in Amplitude](https://developers.amplitude.com/#429s-in-depth).
182
+
183
+
## Identify User
184
+
185
+
In the default configuration, this mapping is triggered when Segment sends an Identify call to Amplitude (Actions).
186
+
187
+
This Action sets the user ID for a specific device ID, or updates the user properties. You can use this when you want to update user information without sending an Event to Amplitude.
188
+
189
+
190
+
## Map User
191
+
192
+
In the default configuration, this mapping is triggered when Segment sends an Alias call to Amplitude (Actions).
193
+
194
+
This Action merges two users together that would otherwise have different User IDs tracked in Amplitude. You can use this when you want to merge the users without sending an Event to Amplitude.
195
+
196
+
197
+
## Group Identify User
198
+
199
+
In the default configuration, this mapping is triggered when Segment sends a Group call to Amplitude (Actions).
200
+
201
+
This Action sets or updates the properties of specific groups. You can use this when you want to update a group's information without sending an Event to Amplitude.
202
+
203
+
These Group updates only affect events that occur after you set up the Amplitude mapping. You cannot use this to group historical data.
204
+
205
+
> success ""
206
+
> If you are on a Business Tier Segment plan, you can use [Replay](/docs/guides/what-is-replay/) to run historical data through the Amplitude (Actions) destination to apply the grouping.
207
+
208
+
209
+
210
+
## Important differences from the classic Amplitude destination
211
+
212
+
The following user fields are captured by the classic Amplitude destination in device-mode (when it runs on the user’s device), but are not captured by Amplitude (Actions):
213
+
214
+
- Device Type (for example, Mac, PC, mobile device)
Most of the classic Amplitude destination settings were related to device-mode collection (for example, batching or Log Revenue V2), and do not apply to the Amplitude (Actions) destination, which runs in cloud-mode. The following sections discuss how to replicate the old settings where possible.
222
+
223
+
> info ""
224
+
> Contact Segment support if you find features missing from the Amplitude (Actions) destination that were available in the classic Amplitude destination.
225
+
226
+
### Track Named, Categorized, or All Pages or Screens
227
+
228
+
The default Amplitude (Actions) subscription sends *all* Page and Screen calls.
229
+
To replicate the old behavior, change the trigger to include only events that contain `name` or `category`.
230
+
231
+
### Prefer Anonymous ID for Device ID
232
+
233
+
To replicate the old behavior, change the mapping for Device ID field.
234
+
Default:
235
+
```objc
236
+
'@if': {
237
+
exists: { '@path': '$.context.device.id' },
238
+
then: { '@path': '$.context.device.id' },
239
+
else: { '@path': '$.anonymousId' }
240
+
}
241
+
```
242
+
243
+
### Use AdvertisingId for DeviceId
244
+
245
+
To replicate the old behavior, change the mapping for Device ID field.
246
+
Default:
247
+
```objc
248
+
'@if': {
249
+
exists: { '@path': '$.context.device.id' },
250
+
then: { '@path': '$.context.device.id' },
251
+
else: { '@path': '$.anonymousId' }
252
+
}
253
+
```
254
+
255
+
256
+
### Location Tracking
257
+
258
+
Location Tracking is a feature of Amplitude’s mobile SDKs and is not supported in Amplitude (Actions) which run in cloud-mode only.
259
+
This setting required that the user grant location permission for the mobile app. This is different from the IP-based location lookup that Amplitude can perform.
260
+
261
+
To work around this limitation, send `context.location.latitude` and `context.location.longitude` from your app, and let Amplitude perform the lookup.
0 commit comments