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/auto-instrumentation/swift-setup.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,23 @@ You'll learn how to add Auto-Instrumentation sources, integrate dependencies, an
13
13
> success "Enable Auto-Instrumentation"
14
14
> To enable Auto-Instrumentation in your Segment workspace, reach out to your dedicated account manager.
15
15
16
-
## Step 1: Add a source and get its write key
16
+
## Step 1: Add or enable a source and get its write key
17
17
18
-
You'll first need to add a source and copy its write key:
18
+
You can either create a new source or turn on Auto-Instrumentation for an existing source. Both methods let you retrieve the `writeKey` that you’ll need later.
19
19
20
-
1. In your Segment workspace, navigate to **Connections > Auto-Instrumentation** and click **Add source**.
21
-
2. Select a source, give the source a name, and click **Save**.
22
-
3. Return to **Connections > Sources** to view your sources.
23
-
4. In the **My sources** table, find and click the new source you just set up.
24
-
5. In the **Initialize the Client** section, look for and copy the `writeKey` displayed in the code block.
20
+
### Create a new source
21
+
22
+
1. In your Segment workspace, navigate to **Connections > Auto-Instrumentation**.
23
+
2. Select **Add source**, give the source a name, and click **Save**.
24
+
3. Return to **Connections > Sources** and select the new source you just set up.
25
+
4. In the **Initialize the Client** section, copy the `writeKey` shown in the code block.
26
+
27
+
### Enable Auto-Instrumentation on an existing source
28
+
29
+
If you want to use an existing source, copy its `writeKey` from **Initialize the Client**. After you install the SDK (Step 2), return to the source settings to turn on Auto-Instrumentation:
30
+
31
+
-**Web:****Connections > Sources > [source] > Settings > Analytics.js > Auto-Instrumentation** and toggle it on.
32
+
-**Mobile:****Connections > Sources > [source] > Settings > Advanced > Auto-Instrumentation** and toggle it on.
25
33
26
34
## Step 2: Add dependencies and initialization code
0 commit comments