Skip to content

Commit f72652f

Browse files
authored
Merge pull request #7972 from segmentio/more-auto-instrumentation-updates
Update Swift auto-instrumentation instructions for adding/enabling a source [DOC-1171]
2 parents e572ac6 + aa2a685 commit f72652f

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,23 @@ You'll learn how to add Auto-Instrumentation sources, integrate dependencies, an
1313
> success "Enable Auto-Instrumentation"
1414
> To enable Auto-Instrumentation in your Segment workspace, reach out to your dedicated account manager.
1515
16-
## Step 1: Add a source and get its write key
16+
## Step 1: Add or enable a source and get its write key
1717

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.
1919

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.
2533

2634
## Step 2: Add dependencies and initialization code
2735

0 commit comments

Comments
 (0)