Skip to content

Commit cfd5d12

Browse files
committed
resolve adobe-swift edits
1 parent 68bbac5 commit cfd5d12

File tree

1 file changed

+41
-103
lines changed
  • src/connections/sources/catalog/libraries/mobile/apple/destination-plugins

1 file changed

+41
-103
lines changed

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

Lines changed: 41 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,45 @@ strat: adobe
44
redirect_from: '/connections/destinations/catalog/omniture/'
55
id: 5783cec280412f644ff14226
66
---
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”}.The following documentation provides detailed explanation of the Device-mode functionality.
8-
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”}.
98

109
## Planning for Adobe Analytics
1110

12-
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 account. 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 that allow more nuanced analysis.
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.
1312

14-
For example, a `Welcome Dialog Dismissed` event in Segment (where the action is "dismissed") with properties that contain the user ID (`user123`) and the dialog name `welcome-dialog`, could be modeled in Adobe Analytics as a pageView with variables that represent the dialog name, visitorID, and the event name mapping the user action ("dismissed") to an eVar.
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").
1514

16-
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 format. Video calls using the format described in this document are also automatically mapped. If you're using the Mobile SDKs, mobile lifecycle events are also automatically mapped. If you will be creating Page and Track events that are outside the scope of the Ecommerce spec, you'll need to map those to your Segment destinations settings UI.
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.
1716

18-
We strongly recommend that you create a tracking plan for both your Segment and Adobe Analytics events before you send any events or properties to Adobe. This will help 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'll have to do this mapping in both the Segment settings, and the Adobe Mobile Services dashboard - so it's good to keep your options open!
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.
1918

2019
## Setting Up the Adobe Analytics SDK
2120

22-
Before you start sending data from your Swift application to Adobe Analytics, you must first finish the following set up steps:
21+
Before you start sending data from your Swift application to Adobe Analytics, complete the following setup steps:
2322

24-
- First, enable the Segment-Adobe Analytics destination from in your Segment workspace.
25-
- From your Adobe Mobile Services dashboard, check and customize the settings on the "Manage App Settings" tab.
26-
- 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 documentation [here](https://marketing.adobe.com/resources/help/en_US/mobile/ios/dev_qs.html){:target="_blank”}
27-
- Finally, follow the instructions below for each mobile environment to bundle Segment's Adobe Analytics SDK in your project.
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.
2827

2928
> success ""
3029
> **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.
3130
3231

3332
## Adding the dependency
3433

35-
### through Xcode
34+
### Using Xcode
3635
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.
3736

38-
https://github.com/segment-integrations/analytics-swift-adobe-analytics{:target="_blank"}
37+
```
38+
https://github.com/segment-integrations/analytics-swift-adobe-analytics
39+
```
3940

40-
You'll then have the option to pin to a version, or specific branch, as well as which project in your workspace to add it to. Once you've made your selections, click the `Add Package` button.
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.
4142

42-
### through Package.swift
43+
### Using Package.swift
4344

44-
Open your Package.swift file and add the following do your the `dependencies` section:
45+
Open your Package.swift file and add the following to the `dependencies` section:
4546

4647
```
4748
.package(
@@ -71,7 +72,7 @@ analytics.add(plugin: AdobeDestination())
7172

7273
## Sending Data to Adobe analytics
7374

74-
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.
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.
7576

7677
## Sending Events
7778

@@ -80,146 +81,83 @@ You can map Segment events in your `Events V2` settings to any event variable yo
8081
> warning ""
8182
> **Note**: Do not use the deprecated `Events` settings. These no longer forward events to Adobe.
8283
83-
Here's an example of how you might map Segment events to Adobe Analytics events connected in device mode:
84+
To map Segment events to Adobe Analytics events in device mode:
8485

8586
<!--todo: rewrite this so that it doesn't rely on the screenshots to explain how to map events in Segment-->
8687

87-
![A screenshot of the Adobe Analytics settings page in Segment, with the Mappings section selected.](images/eventsV2.png)
88+
![A screenshot of the Adobe Analytics settings page in Segment, with the Mappings section selected.](../images/eventsV2.png)
8889

8990
Here's an example of how you would implement the same mapping in Adobe's Mobile Services Dashboard:
9091

91-
![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)
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)
9293

9394
## Sending Custom Properties
9495

9596
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.
9697

97-
![A screenshot of the Adobe Analytics settings page in Segment, with the Mappings section selected.](images/map-property-segment.png)
98+
![A screenshot of the Adobe Analytics settings page in Segment, with the Mappings section selected.](../images/map-property-segment.png)
9899

99100
Here's an example of how you would implement the same mapping in Adobe's Mobile Services Dashboard:
100101

101-
![A screenshot of the Custom Variables tab in Adobe's Mobile Services Dashboard, with one custom variable, Color, defined.](images/map-property-adobe.png)
102-
103-
104-
<table>
105-
<tr>
106-
<td>**Segment Payload Field**</td>
107-
<td>**iOS Mapping Notation**</td>
108-
<td>**Android Mapping Notation**</td>
109-
</tr>
110-
<tr>
111-
<td>`anonymousId`</td>
112-
<td>`anonymousId`</td>
113-
<td>`.anonymousId`</td>
114-
</tr>
115-
<tr>
116-
<td>`messageId`</td>
117-
<td>`messageId`</td>
118-
<td>`.messageId`</td>
119-
</tr>
120-
<tr>
121-
<td>`event`<br>`.track()` calls only</td>
122-
<td>`event`</td>
123-
<td>`.event`</td>
124-
</tr>
125-
<tr>
126-
<td>`name`<br>`screen()` calls only</td>
127-
<td>`name`</td>
128-
<td>`.name`</td>
129-
</tr>
130-
<tr>
131-
<td>`context.traits.key`</td>
132-
<td>`traits.key`</td>
133-
<td>`.context.traits.key`</td>
134-
</tr>
135-
<tr>
136-
<td>`context.key`</td>
137-
<td>`key`</td>
138-
<td>`.context.key`</td>
139-
</tr>
140-
<tr>
141-
<td>`context.arrayKey.key`<br>ie. `context.device.id`</td>
142-
<td>`arrayKey.key`<br>ie. `device.id`</td>
143-
<td>`.context.arrayKey.key`</td>
144-
</tr>
145-
<tr>
146-
<td>`properties.key`</td>
147-
<td>`key`</td>
148-
<td>`key`</td>
149-
</tr>
150-
</table>
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+
151117

152118
## Adobe Lifecycle events
153119

154-
Segment implements Adobe Lifecycle Events automatically - you don't have to enable any additional settings! Lifecycle events gather important information such as 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.
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.
155121

156122
## Identify
157123

158124
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.
159125

160-
{% codeexample %}
161-
{% codeexampletab Identify on iOS %}
162126
```objc
163127
[ADBMobile setUserIdentifier:@"123"];
164128
```
165-
{% endcodeexampletab %}
166-
{% endcodeexample %}
167129
168130
## Screen
169131
170-
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.
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.
171133
172-
{% codeexample %}
173-
{% codeexampletab Screen on iOS %}
174134
175135
```objc
176136
[self.ADBMobile trackState:@"Home Screen" data:<properties mapped in contextData>];
177137
```
178-
{% endcodeexampletab %}
179-
{% endcodeexample %}
180-
181138

182139
## Track
183140

184-
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.
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.
185142
The snippets below show what Segment does with this information.
186143

187-
{% codeexample %}
188-
{% codeexampletab Track on iOS %}
189-
190144
```objc
191145
[ADBMobile trackAction:@"Clicked A Button" data:<properties mapped in contextData>];
192146
```
193-
{% endcodeexampletab %}
194-
{% endcodeexample %}
195-
196147
197148
## Reset
198149
199-
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.
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.
200151
201-
{% codeexample %}
202-
{% codeexampletab Reset on iOS %}
203152
204153
```objc
205154
[ADBMobile trackingClearCurrentBeacon];
206155
```
207-
{% endcodeexampletab %}
208-
{% endcodeexample %}
209-
210-
211156

212157
## Flush
213158

214159
Calling `flush` immediately sends all locally queued events to Adobe.
215160

216-
{% codeexample %}
217-
{% codeexampletab Flush on iOS %}
218-
219-
And on iOS:
220-
221161
```objc
222162
[ADBMobile trackingSendQueuedHits];
223163
```
224-
{% endcodeexampletab %}
225-
{% endcodeexample %}

0 commit comments

Comments
 (0)