Skip to content

Commit 05bd46d

Browse files
Merge pull request #5910 from segmentio/mobile_plugins
Feat: Add Missing Documentation for Mobile Destination Plugins [Netlify Build]
2 parents c5eb474 + 89ea1c0 commit 05bd46d

24 files changed

+1715
-4
lines changed
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
---
2+
title: Adobe Analytics Destination
3+
strat: adobe
4+
redirect_from: '/connections/destinations/catalog/omniture/'
5+
id: 5783cec280412f644ff14226
6+
---
7+
Once you enable Adobe Analytics (formerly known as Omniture or Sitecatalyst) in Segment, you can start sending data from any of the Segment [libraries](/docs/connections/sources/catalog/) to an Adobe report suite. When you send events from Segment's mobile SDKs or Cloud-mode libraries, Segment translates that data using a mapping that you configure, and then passes it to the Adobe Analytics [Data Insertion API](https://docs.adobe.com/content/help/en/analytics/import/c-data-insertion-api.html){:target="_blank”}.
8+
9+
## Planning for Adobe Analytics
10+
11+
Adobe Analytics uses a slightly different approach to tracking than Segment, and it's important to understand the difference so you can effectively set up your integration. Segment uses a user-action data model, which uses different types of calls to track different activities of a user on a website or app. Adobe Analytics uses page views as the basic unit of activity, and variables like custom traffic variables (also called 'props'), eVars, list variables, and hierarchy variables to add details for more nuanced analysis.
12+
13+
For example, if one of your end users dismissed a welcome dialog in your app, Segment would generate a `Welcome Dialog Dismissed` event with properties that contain the user ID (`user123`) and the dialog name (`welcome-dialog`), while Adobe Analytics would model the same action as a pageView with variables that represent the dialog name, visitorID, and the event name, and an eVar ("dismissed").
14+
15+
Both Segment and Adobe Analytics have recommended standard data for tracking events. Segment has [the Spec](/docs/connections/spec/), and Adobe uses predefined events. Segment automatically maps incoming event data and some product level properties to Adobe's predefined events, when the event data is in the correct Segment Ecommerce Spec](/docs/connections/spec/ecommerce/v2/) format. Video calls using the format described in [this document](/docs/connections/spec/video) are also automatically mapped. If you're using the Mobile SDKs, mobile lifecycle events are also automatically mapped. If you need to create Page and Track events that are outside the scope of the Ecommerce Spec, you need to map those in your Segment destinations settings UI.
16+
17+
Segment strongly recommends that you create a [Tracking Plan](/docs/protocols) for both your Segment and Adobe Analytics events before you send any events or properties to Adobe. This helps you map your Segment events to Adobe `events` and Segment properties to Adobe variables. If you decide to set up Adobe Analytics for mobile, you must set up this mapping in both the Segment settings and the Adobe Mobile Services dashboard, so it's good to stay consistent.
18+
19+
## Setting Up the Adobe Analytics SDK
20+
21+
Before you start sending data from your Swift application to Adobe Analytics, complete the following setup steps:
22+
23+
1. Enable the Segment-Adobe Analytics destination in your Segment workspace.
24+
2. From your Adobe Mobile Services dashboard, check and customize the settings on the "Manage App Settings" tab.
25+
3. Download these settings as the `ADBMobileConfig.json` file by clicking the **Config JSON** link at the bottom of the same tab. Follow the instructions in Adobe's [Core implementation and lifestyle](https://marketing.adobe.com/resources/help/en_US/mobile/ios/dev_qs.html){:target="_blank”} documentation.
26+
4. Follow the instructions below for each mobile environment to add the Adobe Analytics dependency to your project.
27+
28+
> success ""
29+
> **Tip**: Mobile implementations use the `ADBMobileConfig.json` file to store the settings that you would otherwise enter in the Adobe Analytics destination settings in the Segment app. You can change these settings from the Manage App Settings tab in your Adobe Mobile Services dashboard, and can download the file from that same tab. This file includes the Report Suite ID, Timestamp Option, Tracking Server Secure URL, Tracking Server URL, and Use Secure URL for Server-side settings.
30+
31+
32+
## Adding the dependency
33+
34+
### Using Xcode
35+
In the Xcode `File` menu, click `Add Packages`. You'll see a dialog where you can search for Swift packages. In the search field, enter the URL to this repository.
36+
37+
```
38+
https://github.com/segment-integrations/analytics-swift-adobe-analytics
39+
```
40+
41+
You then have the option to pin to a version or specific branch and select which project in your workspace to add the package to. Once you've made your selections, click the **Add Package** button.
42+
43+
### Using Package.swift
44+
45+
Open your Package.swift file and add the following to the `dependencies` section:
46+
47+
```
48+
.package(
49+
name: "Segment",
50+
url: "https://github.com/segment-integrations/analytics-swift-adobe-analytics.git",
51+
from: "1.1.3"
52+
),
53+
```
54+
55+
## Using the Plugin in your App
56+
57+
Open the file where you set up and configured the Analytics-Swift library. Add this plugin to the list of imports.
58+
59+
```
60+
import Segment
61+
import SegmentAdobe // <-- Add this line
62+
```
63+
64+
Just under your Analytics-Swift library setup, call `analytics.add(plugin: ...)` to add an instance of the plugin to the Analytics timeline.
65+
66+
```
67+
let analytics = Analytics(configuration: Configuration(writeKey: "<YOUR WRITE KEY>")
68+
.flushAt(3)
69+
.trackApplicationLifecycleEvents(true))
70+
analytics.add(plugin: AdobeDestination())
71+
```
72+
73+
## Sending Data to Adobe analytics
74+
75+
Segment strongly recommends that you create a tracking plan for both your Segment and Adobe Analytics events _before_ you send any events or properties to Adobe. This helps you map your Segment events to Adobe `events` and Segment properties to Adobe `eVars` or `props`, since you'll have to do this in both the Segment settings UI and your Adobe Mobile Services dashboard.
76+
77+
## Sending Events
78+
79+
You can map Segment events in your `Events V2` settings to any event variable you already defined in your Adobe Analytics Mobile Services dashboard.
80+
81+
> warning ""
82+
> **Note**: Do not use the deprecated `Events` settings. These no longer forward events to Adobe.
83+
84+
To map Segment events to Adobe Analytics events in device mode:
85+
86+
<!--todo: rewrite this so that it doesn't rely on the screenshots to explain how to map events in Segment-->
87+
88+
![A screenshot of the Adobe Analytics settings page in Segment, with the Mappings section selected.](../images/eventsV2.png)
89+
90+
Here's an example of how you would implement the same mapping in Adobe's Mobile Services Dashboard:
91+
92+
![A screenshot of the Custom Metrics tab in Adobe's Mobile Services Dashboard, with one custom metric, Clicked a Button, defined.](../images/map-event-adobe.png)
93+
94+
## Sending Custom Properties
95+
96+
You can use the `Context Data Variables` settings to map Segment `properties` to any context data variable defined in your Adobe Analytics Mobile Services dashboard. This includes both Adobe `props` and `eVars`. You can see a list of the Adobe variable types in your Adobe Mobile Services dashboard.
97+
98+
![A screenshot of the Adobe Analytics settings page in Segment, with the Mappings section selected.](../images/map-property-segment.png)
99+
100+
Here's an example of how you would implement the same mapping in Adobe's Mobile Services Dashboard:
101+
102+
![A screenshot of the Custom Variables tab in Adobe's Mobile Services Dashboard, with one custom variable, Color, defined.](../images/map-property-adobe.png)
103+
104+
105+
106+
| Segment Payload Field | iOS Mapping Notation | Android Mapping Notation |
107+
| ----------------------------------------------------------- | ----------------------------------------------------- | ------------------------ |
108+
| `anonymousId` | `anonymousId` | `.anonymousId` |
109+
| `messageId` | `messageId` | `.messageId` |
110+
| `event`<br> Track calls only | `event` | `.event` |
111+
| `name`<br> Screen calls only | `name` | `.name` |
112+
| `context.traits.key` | `traits.key` | `.context.traits.key` |
113+
| `context.key` | `key` | `.context.key` |
114+
| `context.arrayKey.key`<br> for example: `context.device.id` | `arrayKey.key`<br> for example: `device.id` | `.context.arrayKey.key` |
115+
| `properties.key` | `key` | `.key` |
116+
117+
118+
## Adobe Lifecycle events
119+
120+
Segment implements Adobe Lifecycle Events automatically - you don't have to enable any additional settings. Lifecycle events gather important information like app launches, crashes, session length, and more. See the [list of all Adobe lifecycle metrics and dimensions](https://marketing.adobe.com/resources/help/en_US/mobile/android/metrics.html){:target="_blank”} to learn more.
121+
122+
## Identify
123+
124+
When you make an Identify call, Segment sets the Adobe `visitorId` to the value of the user's Segment `userId`. The snippets below show what Segment does with this information.
125+
126+
```objc
127+
[ADBMobile setUserIdentifier:@"123"];
128+
```
129+
130+
## Screen
131+
132+
When you call Screen, Segment sends an Adobe `trackState` event, and passes the screen name and any properties you mapped to Adobe as context data values. The snippets below show what Segment does with this information.
133+
134+
135+
```objc
136+
[self.ADBMobile trackState:@"Home Screen" data:<properties mapped in contextData>];
137+
```
138+
139+
## Track
140+
141+
When you call Track, Segment sends an Adobe `trackAction` event, and passes your event name and any properties you mapped to Adobe as context data values.
142+
The snippets below show what Segment does with this information.
143+
144+
```objc
145+
[ADBMobile trackAction:@"Clicked A Button" data:<properties mapped in contextData>];
146+
```
147+
148+
## Reset
149+
150+
Calling `reset` sets the user's `visitorId` to `null`. `null` is Adobe's default `visitorId` value until you explicitly set it (by calling Identify). The snippets below show what Segment does in the background.
151+
152+
153+
```objc
154+
[ADBMobile trackingClearCurrentBeacon];
155+
```
156+
157+
## Flush
158+
159+
Calling `flush` immediately sends all locally queued events to Adobe.
160+
161+
```objc
162+
[ADBMobile trackingSendQueuedHits];
163+
```

src/connections/sources/catalog/libraries/mobile/apple/destination-plugins/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ plugins:
88
url: https://cdn.filepicker.io/api/file/IefXQy6fRR27ZG1NvZgW
99
mark:
1010
url: https://cdn.filepicker.io/api/file/lqTYxhVyT5WFDFdLS598
11+
- name: Adobe Analytics
12+
url: connections/sources/catalog/libraries/mobile/apple/destination-plugins/adobe-swift/
13+
logo:
14+
url: https://d3hotuclm6if1r.cloudfront.net/logos/omniture-default.svg
15+
mark:
16+
url: https://cdn.filepicker.io/api/file/E42OZ7ThRpuXrvIlMnul
1117
- name: Amplitude
1218
url: connections/sources/catalog/libraries/mobile/apple/destination-plugins/amplitude-swift/
1319
logo:
@@ -44,12 +50,30 @@ plugins:
4450
url: https://cdn.filepicker.io/api/file/W6teayYkRmKgb8SMqxIn
4551
mark:
4652
url: https://cdn.filepicker.io/api/file/ztKtaLBUT7GUZKius5sa
53+
- name: Localytics
54+
url: connections/sources/catalog/libraries/mobile/apple/destination-plugins/localytics-swift/
55+
logo:
56+
url: https://d3hotuclm6if1r.cloudfront.net/logos/localytics-default.svg
57+
mark:
58+
url: https://cdn.filepicker.io/api/file/pzZ27V3PS6Oc0KsWMBmv
4759
- name: Mixpanel
4860
url: connections/sources/catalog/libraries/mobile/apple/destination-plugins/mixpanel-swift/
4961
logo:
5062
url: https://cdn.filepicker.io/api/file/pUF0kwpTTu0Z5POuzZXV
5163
mark:
5264
url: https://cdn.filepicker.io/api/file/0mdiroESxtRQBoR8ieBg
65+
- name: Nielsen-DCR
66+
url: connections/sources/catalog/libraries/mobile/apple/destination-plugins/nielsen-dcr-swift/
67+
logo:
68+
url: https://cdn.filepicker.io/api/file/yzGpbGW0T28PvM1s96BW
69+
mark:
70+
url: https://cdn.filepicker.io/api/file/Az5dYYXJSWzG0xeV0XUg
71+
- name: Nielsen-DTVR
72+
url: connections/sources/catalog/libraries/mobile/apple/destination-plugins/nielsen-dtvr-swift/
73+
logo:
74+
url: https://cdn.filepicker.io/api/file/yzGpbGW0T28PvM1s96BW
75+
mark:
76+
url: https://cdn.filepicker.io/api/file/Az5dYYXJSWzG0xeV0XUg
5377
- name: Optimizely Full Stack
5478
url: connections/sources/catalog/libraries/mobile/apple/destination-plugins/optimizely-full-stack-swift
5579
logo:

0 commit comments

Comments
 (0)