Skip to content

Commit 43d6e37

Browse files
authored
edits [netlify-build]
1 parent 5108f0c commit 43d6e37

File tree

1 file changed

+26
-28
lines changed

1 file changed

+26
-28
lines changed

src/connections/auto-instrumentation/kotlin-setup.md

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Segment recommends testing in a development environment before deploying Signals
2626

2727
## Prerequisites
2828

29-
Auto-Instrumentation (aka Signals) works on top of Analytics and Live Plugins. Make sure to add the following dependencies to your module's Gradle file if you don't have them already.
29+
Auto-Instrumentation (also known as Signals) works on top of Analytics and Live Plugins. Make sure to add the following dependencies to your module's Gradle file if you don't have them already.
3030

3131
```groovy
3232
// analytics kotlin
@@ -37,7 +37,7 @@ implementation("com.segment.analytics.kotlin:analytics-kotlin-live:1.3.0")
3737

3838
## Step 1: Getting started
3939

40-
Instrumentation becomes as simple as adding dependencies to your module's Gradle file:
40+
To get started:
4141
1. Add Signals Core
4242
```groovy
4343
// signal core
@@ -62,13 +62,13 @@ Instrumentation becomes as simple as adding dependencies to your module's Gradle
6262
)
6363
```
6464
3. Add proper dependency and plugin as needed to:
65-
* [Capture Interactions](#capture-interactions)
66-
* [Capture Navigation](#capture-navigation)
67-
* [Capture Network](#capture-network)
65+
* [Capture interactions](#capture-interactions).
66+
* [Capture navigation](#capture-navigation).
67+
* [Capture network](#capture-network).
6868
6969
## Step 2: Additional setup
7070
71-
### Capture Interactions
71+
### Capture interactions
7272
7373
#### Kotlin Compose
7474
@@ -84,15 +84,15 @@ Instrumentation becomes as simple as adding dependencies to your module's Gradle
8484
8585
#### Legacy XML UI
8686
87-
1. Add uitoolkit Gradle Plugin dependency to project level `build.gradle`
87+
1. Add the uitoolkit Gradle Plugin dependency to project-level `build.gradle`:
8888
```groovy
8989
buildscript {
9090
dependencies {
9191
classpath 'com.segment.analytics.kotlin.signals:uitoolkit-gradle-plugin:1.0.0'
9292
}
9393
}
9494
```
95-
2. Apply the plugin in your app level `build.gradle` and add the dependency
95+
2. Apply the plugin in your app-level `build.gradle` and add the dependency:
9696
```groovy
9797
plugins {
9898
// ...other plugins
@@ -106,17 +106,17 @@ Instrumentation becomes as simple as adding dependencies to your module's Gradle
106106
```
107107
108108
109-
### Capture Navigation
109+
### Capture navigation
110110
111-
1. Add navigation Gradle Plugin dependency to project level `build.gradle`
111+
1. Add the navigation Gradle Plugin dependency to project-level `build.gradle`:
112112
```groovy
113113
buildscript {
114114
dependencies {
115115
classpath 'com.segment.analytics.kotlin.signals:navigation-gradle-plugin:1.0.0'
116116
}
117117
}
118118
```
119-
2. Apply the plugin in your app level `build.gradle` and add the dependency
119+
2. Apply the plugin in your app-level `build.gradle` and add the dependency:
120120
```groovy
121121
plugins {
122122
// ...other plugins
@@ -128,21 +128,21 @@ Instrumentation becomes as simple as adding dependencies to your module's Gradle
128128
implementation ("com.segment.analytics.kotlin.signals:navigation:1.0.0")
129129
}
130130
```
131-
3. (Optional) Add `SignalsActivityTrackingPlugin` to analytics to track Activity/Fragment navigation. **Not required for Compose Navigation**
131+
3. (Optional) Add `SignalsActivityTrackingPlugin` to analytics to track Activity/Fragment navigation. **This is not required for Compose Navigation**.
132132
```kotlin
133133
analytics.add(SignalsActivityTrackingPlugin())
134134
```
135135
136-
### Capture Network
136+
### Capture network
137137
138138
#### OkHttp
139139
140-
1. add dependency:
140+
1. Add the dependency:
141141
```groovy
142142
implementation ("com.segment.analytics.kotlin.signals:okhttp3:1.0.0")
143143
```
144144
145-
2. add `SignalsOkHttp3TrackingPlugin` as an interceptor to your OkHttpClient:
145+
2. Add `SignalsOkHttp3TrackingPlugin` as an interceptor to your OkHttpClient:
146146
```kotlin
147147
private val okHttpClient = OkHttpClient.Builder()
148148
.addInterceptor(SignalsOkHttp3TrackingPlugin())
@@ -151,12 +151,12 @@ Instrumentation becomes as simple as adding dependencies to your module's Gradle
151151
152152
#### Retrofit
153153
154-
1. add dependency:
154+
1. Add the dependency:
155155
```groovy
156156
implementation ("com.segment.analytics.kotlin.signals:okhttp3:1.0.0")
157157
```
158158
159-
2. add `SignalsOkHttp3TrackingPlugin` as an interceptor to your Retrofit client:
159+
2. Add `SignalsOkHttp3TrackingPlugin` as an interceptor to your Retrofit client:
160160
```kotlin
161161
private val okHttpClient = OkHttpClient.Builder()
162162
.addInterceptor(SignalsOkHttp3TrackingPlugin())
@@ -168,12 +168,12 @@ Instrumentation becomes as simple as adding dependencies to your module's Gradle
168168
```
169169
170170
#### java.net.HttpURLConnection
171-
1. add dependency:
171+
1. Add the dependency:
172172
```groovy
173173
implementation ("com.segment.analytics.kotlin.signals:java-net:1.0.0")
174174
```
175175
176-
2. install the `JavaNetTrackingPlugin` on where you initialize analytics:
176+
2. Install the `JavaNetTrackingPlugin` on where you initialize analytics:
177177
```kotlin
178178
JavaNetTrackingPlugin.install()
179179
```
@@ -183,7 +183,7 @@ Instrumentation becomes as simple as adding dependencies to your module's Gradle
183183
184184
By default, Signals stores captured data on the device and doesn't forward it to Segment. This process prevents unnecessary bandwidth use and helps support privacy compliance requirements.
185185
186-
To view captured signals in the Event Builder and create event generation rules, you need to enable `sendDebugSignalsToSegment`. This setting temporarily lets the SDK send signal data to Segment while you're testing.
186+
To view captured signals in the Event Builder and create event generation rules, enable `sendDebugSignalsToSegment`. This setting temporarily lets the SDK send signal data to Segment while you're testing.
187187
188188
In addition, the SDK obfuscates signals sent to Segment by default. To view the completed data, you need to turn off `obfuscateDebugSignals`.
189189
@@ -241,7 +241,7 @@ Signals.configuration = Configuration(
241241
Next, return to the source settings to turn on Auto-Instrumentation:
242242

243243
1. Go to **Connections > Sources**.
244-
2. Select the source you used in Step 1.
244+
2. Select the source you used in [Step 1](#Step-1-Getting-started).
245245
3. From the source's overview tab, go to **Settings > Advanced**.
246246
4. Toggle Auto-Instrumention on.
247247

@@ -251,13 +251,11 @@ After you build and run your app, use the [Event Builder](/docs/connections/auto
251251

252252
1. In your Segment workspace, go to **Connections > Sources** and select the Android Source you configured.
253253
2. Open the **Event Builder** tab.
254-
3. Interact with your app on a simulator or test device:
255-
- Navigate between screens.
256-
- Tap buttons and UI elements.
257-
- Trigger network requests.
258-
259-
If `sendDebugSignalsToSegment` is enabled, Signals appear in real time as you interact with the app.
260-
254+
3. Interact with your app on a simulator or test device:
255+
> - Navigate between screens.
256+
> - Tap buttons and UI elements.
257+
> - Trigger network requests.
258+
> If `sendDebugSignalsToSegment` is enabled, Signals appear in real time as you interact with the app.
261259
4. In the Event Builder, select a signal and click **Configure event** to define a new event.
262260
5. After you add any event mappings, click **Publish event rules** to save them.
263261

0 commit comments

Comments
 (0)