Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions src/connections/auto-instrumentation/web-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@ You'll learn how to add Auto-Instrumentation sources, integrate dependencies, an
> success "Enable Auto-Instrumentation"
> To enable Auto-Instrumentation in your Segment workspace, reach out to your dedicated account manager.

## Step 1: Add a source and get its write key
## Step 1: Add or enable a source and get its write key

You'll first need to add a source and copy its write key:
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.

1. In your Segment workspace, navigate to **Connections > Auto-Instrumentation** and click **Add source**.
2. Select a source, give the source a name, and click **Save**.
3. Return to **Connections > Sources** to view your sources.
4. In the **My sources** table, find and click the new source you just set up.
5. In the **Initialize the Client** section, look for and copy the `writeKey` displayed in the code block.
### Create a new source

1. In your Segment workspace, navigate to **Connections > Auto-Instrumentation**.
2. Select **Add source**, give the source a name, and click **Save**.
3. Return to **Connections > Sources** and select the new source you just set up.
4. In the **Initialize the Client** section, copy the `writeKey` shown in the code block.

### Enable Auto-Instrumentation on an existing source

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:

- **Web:** **Connections > Sources > [source] > Settings > Analytics.js > Auto-Instrumentation** and toggle it on.
- **Mobile:** **Connections > Sources > [source] > Settings > Advanced > Auto-Instrumentation** and toggle it on.

## Step 2: Add dependencies and initialization code

Expand Down