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/web-setup.md
+36-23Lines changed: 36 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,14 +31,16 @@ Choose one of the following installation methods based on your setup:
31
31
32
32
### Option A: Snippet Users (HTML)
33
33
34
-
For websites using the Segment snippet, add the SignalsPlugin using a CDN:
34
+
For websites using the Segment snippet, please REPLACE the regular Segment snippet with the following code, which includes the Signals SDK:
35
+
36
+
> warning ""
37
+
> If you are currently using Segment, replace the existing Segment snippet that loads analytics.js with the modified code below. You should not have two segment snippets that call analytics.load() in your html.
35
38
36
39
```html
37
40
<head>
38
41
<title>My Website</title>
39
-
40
-
<!-- Load Segment (find and replace '<YOUR_WRITE_KEY>') -->
41
-
<script>
42
+
<!-- Replace <YOUR_WRITE_KEY> in 'data-segment-write-key' -->
43
+
<scriptdata-segment-write-key="<YOUR_WRITE_KEY>">
42
44
!(function () {
43
45
var i ="analytics",
44
46
analytics = (window[i] =window[i] || []);
@@ -121,21 +123,24 @@ For websites using the Segment snippet, add the SignalsPlugin using a CDN:
@@ -183,23 +188,31 @@ After integrating the SDK and running your app, verify that Segment is collectin
183
188
184
189
1. In your Segment workspace, return to **Connections > Sources**, then select the source you created for Auto-Instrumentation.
185
190
2. In the source overview, look for the **Event Builder** tab. If the tab doesn’t appear:
186
-
- Make sure you've installed the SDK correctly.
187
-
- Reach out to your Segment CSM to confirm that your workspace has the necessary feature flags enabled.
191
+
192
+
- Make sure you've installed the SDK correctly.
193
+
- Reach out to your Segment CSM to confirm that your workspace has the necessary feature flags enabled.
188
194

189
-
3. Open the **Event Builder** and follow the on-screen instructions to start signal detection.
190
-
- To collect signals in the UI, visit your site in a browser using the query string:`?segment_signals_debug=true`
195
+
196
+
3. Open the **Event Builder** and follow the on-screen instructions to start signal detection.
197
+
198
+
- To collect signals in the UI, visit your site in a browser using the query string:`?segment_signals_debug=true`
199
+
191
200
4. Interact with your app to trigger signals: click buttons, navigate pages, submit forms, and so on. Segment collects and displays these as signals in real time.
192
201
5. From the signals list, click **Configure event** to define a new event based on one or more signals. After configuring the event, click **Publish event rules**.
193
202
194
-
195
203
### Debugging
204
+
196
205
#### Enable debug mode
206
+
197
207
Values sent to the signals API are redacted by default.
198
-
This adds a local storage key. To disable redaction, add a magic query string:
208
+
This adds a local storage key. To disable redaction, add a magic query string:
@@ -305,4 +318,4 @@ Network signals emit when an HTTP Request is made, or an HTTP Response is receiv
305
318
306
319
## Next steps
307
320
308
-
This guide walked you through initial Signals SDK/Auto-Instrumentation setup. Next, read the [Auto-Instrumentation Signals Implementation Guide](/docs/connections/auto-instrumentation/configuration/), which dives deeper into Signals and offers example rules.
321
+
This guide walked you through initial Signals SDK/Auto-Instrumentation setup. Next, read the [Auto-Instrumentation Signals Implementation Guide](/docs/connections/auto-instrumentation/configuration/), which dives deeper into Signals and offers example rules.
0 commit comments