Skip to content

Commit 6fa2e55

Browse files
committed
resolve adobe-kotlin edits
1 parent 062d505 commit 6fa2e55

File tree

1 file changed

+37
-100
lines changed

1 file changed

+37
-100
lines changed

src/connections/sources/catalog/libraries/mobile/kotlin-android/destination-plugins/adobe-kotlin-android.md

Lines changed: 37 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,31 @@ Once you enable Adobe Analytics (formerly known as Omniture or Sitecatalyst) in
88

99
The following documentation provides detailed explanation of how both destination the Device-mode and Cloud-mode components work. For FAQs about Device- vs Cloud-mode tracking, unique users, identifiers, and more, see the Best Practices page!
1010

11-
1211
## Planning for Adobe Analytics
1312

14-
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.
13+
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.
1514

16-
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.
15+
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").
1716

18-
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.
17+
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 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.
1918

20-
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!
19+
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 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.
2120

2221
## Setting Up the Adobe Analytics SDK
2322

24-
Before you start sending data from your Swift application to Adobe Analytics, you must first finish the following set up steps:
23+
Before you start sending data from your Kotlin application to Adobe Analytics, complete the following setup steps:
2524

26-
- First, enable the Segment-Adobe Analytics destination from in your Segment workspace.
27-
- From your Adobe Mobile Services dashboard, check and customize the settings on the "Manage App Settings" tab.
28-
- Download these settings as the `ADBMobileConfig.json` file by clicking the **Config JSON** link at the bottom of the same tab.
29-
- Finally, follow the instructions below for each mobile environment to bundle Segment's Adobe Analytics SDK in your project.
25+
1. Enable the Segment-Adobe Analytics destination in your Segment workspace.
26+
2. From your Adobe Mobile Services dashboard, check and customize the settings on the "Manage App Settings" tab.
27+
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://github.com/Adobe-Marketing-Cloud/mobile-services/blob/master/docs/android/getting-started/dev-qs.md){:target="_blank”} documentation.
28+
4. Follow the instructions below for each mobile environment to add the Adobe Analytics dependency to your project.
3029

3130
> success ""
3231
> **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.
3332
3433

3534
## Adding the dependency
36-
To install the Segment-Adobe-Analytics integration, simply add this line to your gradle file:
35+
To install the Segment-Adobe Analytics integration, add this line to your gradle file:
3736

3837
```
3938
implementation 'com.segment.analytics.kotlin.destinations:adobe-analytics:<latest_version>'
@@ -48,7 +47,7 @@ implementation("com.segment.analytics.kotlin.destinations:adobe-analytics:<lates
4847

4948
## Using the Plugin in your App
5049

51-
Open the file where you setup and configure the Analytics-Kotlin library. Add this plugin to the list of imports.
50+
Open the file where you set up and configured the Analytics-Kotlin library. Add this plugin to the list of imports.
5251

5352
```
5453
import com.segment.analytics.kotlin.destinations.adobeanalytics.AdobeAnalyticsDestination
@@ -64,12 +63,12 @@ Just under your Analytics-Kotlin library setup, call `analytics.add(plugin = ...
6463
analytics.add(plugin = AdobeAnalyticsDestination(adobeAppID = "<WRITE YOUR ENVIRONMENT-FILE-ID>"))
6564
```
6665

67-
Your events will now begin to flow to Adobe-Analytics in device mode.
66+
Your events will now begin to flow to Adobe Analytics in device-mode.
6867

6968

70-
## Sending Data to Adobe analytics
69+
## Sending data to Adobe Analytics
7170

72-
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.
71+
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.
7372

7473
## Sending Events
7574

@@ -82,70 +81,34 @@ Here's an example of how you might map Segment events to Adobe Analytics events
8281

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

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

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

89-
![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)
88+
![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)
9089

9190
## Sending Custom Properties
9291

9392
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.
9493

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

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

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

150113
## Adobe Lifecycle events
151114

@@ -155,67 +118,41 @@ Segment implements Adobe Lifecycle Events automatically - you don't have to enab
155118

156119
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.
157120

158-
{% codeexample %}
159-
{% codeexampletab Identify on Android %}
160121

161122
```java
162123
Config.setUserIdentifier("123");
163124
```
164-
{% endcodeexampletab %}
165-
{% endcodeexample %}
166125

167126
## Screen
168127

169-
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.
128+
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.
170129

171-
The snippets below show what Segment does with this information.
130+
For example:
172131

173-
{% codeexample %}
174-
{% codeexampletab Screen on Android %}
175132
```java
176133
Analytics.trackState("Home Screen", <properties mapped in contextData>);
177134
```
178-
{% endcodeexampletab %}
179-
{% endcodeexample %}
180-
181135

182136
## Track
183137

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.
185-
The snippets below show what Segment does with this information.
138+
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.
186139

187-
{% codeexample %}
188-
{% codeexampletab Track on Android %}
140+
Fore example:
189141

190142
```java
191143
Analytics.trackEvent("Clicked A Button", <properties mapped in contextData>);
192144
``````
193-
{% endcodeexampletab %}
194-
{% endcodeexample %}
195-
196145

197146
## Reset
198147

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.
200-
201-
{% codeexample %}
202-
{% codeexampletab Reset on Android %}
148+
For exmple:
203149
```java
204150
Config.setUserIdentifier(null);
205151
```
206-
{% endcodeexampletab %}
207-
{% endcodeexample %}
208-
209-
210152

211153
## Flush
212154

213-
Calling `flush` immediately sends all locally queued events to Adobe.
214-
215-
{% codeexample %}
216-
{% codeexampletab Flush on Android %}
217155
```java
218156
Analytics.sendQueuedHits();
219157
```
220-
{% endcodeexampletab %}
221-
{% endcodeexample %}
158+

0 commit comments

Comments
 (0)