Skip to content

Commit 2db534d

Browse files
authored
Merge pull request #7821 from segmentio/auto-instrumentation-configuration-updates
Auto-Instrumentation configuration updates
2 parents 390f0fa + 9608a59 commit 2db534d

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

src/connections/auto-instrumentation/configuration.md

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,30 @@ After you set up the Signals SDK to capture the signals you want to target, you
2323

2424
### Getting started with rule creation
2525

26-
1. In your Segment workspace, go to to **Connections > Auto-Instrumentation** and click on a source.
27-
2. Click **Create Rules**.
26+
1. In your Segment workspace, go to **Sources** and select a source.
27+
2. Open the **Event Builder**, then click **Create Rules**.
2828

2929
> info "Where's the Event Builder tab?"
3030
> The Event Builder tab only appears after you've installed the Auto-Instrumentation snippet in your site or app. If you don’t see the tab, double check your implementation or reach out to your Segment CSM.
3131
3232
### Using the Rules Editor
3333

34-
The Rules Editor is where you define rules that transform raw signal data into analytics events. In the editor, you write functions that convert signals into events and then call them in the `processSignal()` function.
34+
The Rules Editor is where you define rules that transform raw signal data into analytics events. Using the dropdown-based editor, you can:
35+
36+
- Combine multiple signals into a single event (for example, a click followed by a navigation)
37+
- Set conditions to control when events should be triggered
38+
- Assign custom event names
39+
40+
#### Adding event properties
41+
42+
You can enrich your events by adding properties based on signal metadata. For example:
43+
44+
- Capture `product.price` in your **Add to Cart** event
45+
- Add a boolean field like `couponApplied` to your **Order Completed** event
46+
47+
These properties are sent alongside your event, giving your team deeper insights without requiring any manual instrumentation.
48+
49+
<!-- PW, 6 August 2025: Commenting this section out for now
3550
3651
The Rules Editor also lets you test your rules with recent signals to verify that they produce the data you need before you deploy.
3752
@@ -49,6 +64,9 @@ function processSignal(signal) {
4964
}
5065
```
5166
67+
-->
68+
69+
<!-- PW, 6 August 2025: Also commenting the Signal definitions page out on PM request
5270
## Signal definitions
5371
5472
Signals come in various types, each associated with specific data that you can use to create analytics events. This section contains code samples that detail each signal type. Because Segment has standardized these definitions across both the Signals-Swift and Signals-Kotlin libraries, they're useful when you create rules in your Segment workspace.
@@ -209,12 +227,23 @@ class MyCustomSignal extends RawSignal<MyCustomData> {
209227
}
210228
```
211229
230+
231+
232+
-->
212233
## Example rule implementations
213234

214-
You can use the Signals data definitions on this page to create tracking rules.
235+
You can use Signals to create tracking rules using the event builder.
215236

216237
### Example: Identify users
217238

239+
The following screenshot shows an Identify event rule that combines a button click with a successful network response to extract user data and trigger an identify call.
240+
241+
![Identify event rule combining UI and network triggers](images/signals_identify_event.png)
242+
243+
244+
245+
<!-- PW: more commenting out>
246+
218247
Building off of the screen tracking example, you could create a rule that identifies users:
219248
220249
```javascript
@@ -247,11 +276,15 @@ function processSignal(signal) {
247276
detectIdentify(signal); // Process the Identify call based on incoming signals
248277
}
249278
```
250-
279+
-->
251280

252281
### Example: Track `Add to Cart` events
253282

254-
This rule shows how you could implement the core ordering events from [the e-commerce Spec](/docs/connections/spec/ecommerce/v2/#core-ordering-overview):
283+
This rule implements a core ordering event from [the e-commerce Spec](/docs/connections/spec/ecommerce/v2/#core-ordering-overview). It shows a Track event triggered by a button click and a network response, with product details from the response mapped to event properties.
284+
285+
![Track event rule for Add to Cart using button click and network response](images/signals_track_event.png)
286+
287+
<!-- PW: even more commenting out
255288
256289
```javascript
257290
function trackAddToCart(currentSignal) {
@@ -284,3 +317,4 @@ function ProcessSignals(signal) {
284317
trackAddToCart(signal); // Process the "Add To Cart" tracking based on incoming signals
285318
}
286319
```
320+
-->
106 KB
Loading
107 KB
Loading

0 commit comments

Comments
 (0)