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/sources/catalog/libraries/mobile/kotlin-android/destination-plugins/adobe-kotlin-android.md
@@ -8,32 +8,31 @@ Once you enable Adobe Analytics (formerly known as Omniture or Sitecatalyst) in
8
8
9
9
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!
10
10
11
-
12
11
## Planning for Adobe Analytics
13
12
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.
15
14
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").
17
16
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.
19
18
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.
21
20
22
21
## Setting Up the Adobe Analytics SDK
23
22
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:
25
24
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.
30
29
31
30
> success ""
32
31
> **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.
33
32
34
33
35
34
## Adding the dependency
36
-
To install the Segment-Adobe-Analytics integration, simply add this line to your gradle file:
35
+
To install the Segment-AdobeAnalytics integration, add this line to your gradle file:
@@ -64,12 +63,12 @@ Just under your Analytics-Kotlin library setup, call `analytics.add(plugin = ...
64
63
analytics.add(plugin = AdobeAnalyticsDestination(adobeAppID = "<WRITE YOUR ENVIRONMENT-FILE-ID>"))
65
64
```
66
65
67
-
Your events will now begin to flow to Adobe-Analytics in devicemode.
66
+
Your events will now begin to flow to AdobeAnalytics in device-mode.
68
67
69
68
70
-
## Sending Data to Adobe analytics
69
+
## Sending data to Adobe Analytics
71
70
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.
73
72
74
73
## Sending Events
75
74
@@ -82,70 +81,34 @@ Here's an example of how you might map Segment events to Adobe Analytics events
82
81
83
82
<!--todo: rewrite this so that it doesn't rely on the screenshots to explain how to map events in Segment-->
84
83
85
-

84
+

86
85
87
86
Here's an example of how you would implement the same mapping in Adobe's Mobile Services Dashboard:
88
87
89
-

88
+

90
89
91
90
## Sending Custom Properties
92
91
93
92
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.
94
93
95
-

94
+

96
95
97
96
Here's an example of how you would implement the same mapping in Adobe's Mobile Services Dashboard:
98
97
99
-


|`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
+
149
112
150
113
## Adobe Lifecycle events
151
114
@@ -155,67 +118,41 @@ Segment implements Adobe Lifecycle Events automatically - you don't have to enab
155
118
156
119
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.
157
120
158
-
{% codeexample %}
159
-
{% codeexampletab Identify on Android %}
160
121
161
122
```java
162
123
Config.setUserIdentifier("123");
163
124
```
164
-
{% endcodeexampletab %}
165
-
{% endcodeexample %}
166
125
167
126
## Screen
168
127
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.
170
129
171
-
The snippets below show what Segment does with this information.
130
+
For example:
172
131
173
-
{% codeexample %}
174
-
{% codeexampletab Screen on Android %}
175
132
```java
176
133
Analytics.trackState("Home Screen", <properties mapped in contextData>);
177
134
```
178
-
{% endcodeexampletab %}
179
-
{% endcodeexample %}
180
-
181
135
182
136
## Track
183
137
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.
186
139
187
-
{% codeexample %}
188
-
{% codeexampletab Track on Android %}
140
+
Fore example:
189
141
190
142
```java
191
143
Analytics.trackEvent("Clicked A Button", <properties mapped in contextData>);
192
144
``````
193
-
{% endcodeexampletab %}
194
-
{% endcodeexample %}
195
-
196
145
197
146
## Reset
198
147
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:
203
149
```java
204
150
Config.setUserIdentifier(null);
205
151
```
206
-
{% endcodeexampletab %}
207
-
{% endcodeexample %}
208
-
209
-
210
152
211
153
## Flush
212
154
213
-
Calling `flush` immediately sends all locally queued events to Adobe.
0 commit comments