Skip to content
Merged
Show file tree
Hide file tree
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
28 changes: 12 additions & 16 deletions src/connections/auto-instrumentation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ title: Generate Events from Signals
hidden: true
---

This guide details how to use signals, and their associated data, generated in one of the Signals SDKs with the Auto-Instrumentation dashboard in your Segment workspace. On this page, you'll find details on:
This guide details how to use signals and their associated data, generated in one of the Signals SDKs with the Auto-Instrumentation dashboard in your Segment workspace. On this page, find details on:

- Creating custom rules to capture and translate signals into actionable analytics events
- Example rules that you can use as a basis for further customization
- Creating custom rules to capture and translate signals into actionable analytics events.
- Example rules that you can use as a basis for further customization.

This guide assumes that you've already added the Signals SDK to your application. If you haven't yet, see the [Auto-Instrumentation Setup](/docs/connections/auto-instrumentation/) guide for initial setup.

> info "Auto-Instrumentation Private Beta"
> Auto-Instrumentation is currently in Private Beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}. Segment is actively iterating on and improving the Auto-Instrumentation user experience.

> success "Enable Auto-Instrumentation"
> To enable Auto-Instrumentation in your Segment workspace, reach out to your dedicated account manager.

> info "Auto-Instrumentation in public beta"
> Auto-Instrumentation is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.

## Converting signals to events

Expand All @@ -33,16 +29,16 @@ After you set up the Signals SDK to capture the signals you want to target, you

The Rules Editor is where you define rules that transform raw signal data into analytics events. Using the dropdown-based editor, you can:

- Combine multiple signals into a single event (for example, a click followed by a navigation)
- Set conditions to control when events should be triggered
- Assign custom event names
- Combine multiple signals into a single event (for example, a click followed by a navigation).
- Set conditions to control when events should be triggered.
- Assign custom event names.

#### Adding event properties

You can enrich your events by adding properties based on signal metadata. For example:

- Capture `product.price` in your **Add to Cart** event
- Add a boolean field like `couponApplied` to your **Order Completed** event
- Capture `product.price` in your **Add to Cart** event.
- Add a boolean field like `couponApplied` to your **Order Completed** event.

These properties are sent alongside your event, giving your team deeper insights without requiring any manual instrumentation.

Expand Down Expand Up @@ -89,7 +85,7 @@ interface RawSignal<T> {

### Signal Types

The Signal Type enum defines the different types of signals the SDK can collect:
The Signal Type `enum` defines the different types of signals the SDK can collect:

```java
enum SignalType {
Expand Down Expand Up @@ -317,4 +313,4 @@ function ProcessSignals(signal) {
trackAddToCart(signal); // Process the "Add To Cart" tracking based on incoming signals
}
```
-->
-->
9 changes: 3 additions & 6 deletions src/connections/auto-instrumentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ redirect_from:

Auto-Instrumentation simplifies tracking in your websites and apps by removing the need for a traditional Segment instrumentation.

> info "Auto-Instrumentation Private Beta"
> Auto-Instrumentation is currently in private beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}. Segment is actively iterating on and improving the Auto-Instrumentation user experience.

> success "Enable Auto-Instrumentation in your workspace"
> To enable Auto-Instrumentation in your Segment workspace, reach out to your dedicated account manager or [email protected].
> info "Auto-Instrumentation in public beta"
> Auto-Instrumentation is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.

## Background

Expand All @@ -52,7 +49,7 @@ After you install the required SDKs and enable Auto-Instrumentation, Segment det

You can group signals into complete analytics events, assign names, and map custom properties. You can then [use this data to create detailed analytics events](/docs/connections/auto-instrumentation/configuration/) based on those signals, enriching your insights into user behavior and application performance.

## Setup Guides
## Setup guides

<div class="auto-instrumentation-catalog">
<div class="auto-insturmentation__section markdown" id="{{ category | slugify }}">
Expand Down
25 changes: 11 additions & 14 deletions src/connections/auto-instrumentation/kotlin-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@ Segment’s Signals library powers [Auto-Instrumentation](/docs/connections/auto

This guide shows how to install and configure the library, as well as how to enable optional plugins for screen views, network activity, and more.

> info "Auto-Instrumentation Private Beta"
> Auto-Instrumentation is currently in Private Beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}. Segment is actively iterating on and improving the Auto-Instrumentation user experience.
> info "Auto-Instrumentation in public beta"
> Auto-Instrumentation is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
> success "Auto-Instrumentation access"
> To turn Auto-Instrumentation on in your Segment workspace, reach out to your dedicated account manager.
## Before you begin
## Before you start

To use Signals with Android, you need:

- An active Segment workspace with Auto-Instrumentation enabled
- A Kotlin-based Android project
- Android Gradle Plugin version 7.0 or later
- A minimum compile SDK version of 21
- An active Segment workspace with Auto-Instrumentation enabled.
- A Kotlin-based Android project.
- Android Gradle Plugin version 7.0 or later.
- A minimum compile SDK version of 21.

Signals supports [Jetpack Compose](https://developer.android.com/compose){:target="_blank"} and traditional Android UI frameworks. It also includes optional plugins for network tracking using [OkHttp3](https://square.github.io/okhttp/){:target="_blank"}, [Retrofit](https://square.github.io/retrofit/){:target="_blank"}, or `HttpURLConnection`](https://developer.android.com/reference/java/net/HttpURLConnection){:target="_blank"}.
Signals supports [Jetpack Compose](https://developer.android.com/compose){:target="_blank"} and traditional Android UI frameworks. It also includes optional plugins for network tracking using [OkHttp3](https://square.github.io/okhttp/){:target="_blank"}, [Retrofit](https://square.github.io/retrofit/){:target="_blank"}, or [HttpURLConnection](https://developer.android.com/reference/java/net/HttpURLConnection){:target="_blank"}.

Segment recommends testing in a development environment before deploying Signals in production. For more information, see [Debug mode](#step-4-enable-debug-mode).

Expand Down Expand Up @@ -66,7 +63,7 @@ Only add the plugins you plan to use. You can add or remove them later without r

## Step 2: Initialize the SDK

After you add dependencies, you'll need to initialize the Analytics client and configure the Signals plugin.
After you add dependencies, you need to initialize the Analytics client and configure the Signals plugin.

Start by creating the `Analytics` instance using your source's write key. Then add the Signals plugin and configure its settings separately.

Expand Down Expand Up @@ -98,7 +95,7 @@ navController.turnOnScreenTracking()

When you run this code, keep the following in mind:

- You'll need to replace `<WRITE_KEY>` with the key from your Android Source in Segment.
- You need to replace `<WRITE_KEY>` with the key from your Android Source in Segment.
- `debugMode` sends signals to Segment for use in the Event Builder. Only enable it in development environments.
- If your app doesn't use Jetpack Compose or Navigation, you can skip those plugin lines.

Expand Down Expand Up @@ -233,7 +230,7 @@ If `debugMode` is enabled, Signals appear in real time as you interact with the
5. After you add any event mappings, click **Publish event rules** to save them.

> info "What if I don't see the Event Builder tab?"
> If you don't see the Event Builder tab, confirm that the SDK is installed correctly and make sure `debugMode` is enabled. If you still don't see it, reach out to your CSM to verify that your workspace has Auto-Instrumentation enabled.
> If you don't see the Event Builder tab, confirm that the SDK is installed correctly and make sure `debugMode` is enabled. Verify that Auto-Instrumentation is enabled in **Settings > Advanced**. If you still don't see it, reach out to your CSM.
## Configuration options

Expand Down
21 changes: 9 additions & 12 deletions src/connections/auto-instrumentation/swift-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ hidden: true

This guide outlines the steps required to set up the Signals SDK in your Apple OS applications using Swift.

You'll learn how to connect an existing source, integrate dependencies, turn on Auto-Instrumentation, and verify that your setup captures and processes data as intended.
Learn how to connect an existing source, integrate dependencies, turn on Auto-Instrumentation, and verify that your setup captures and processes data as intended.

> info "Auto-Instrumentation Private Beta"
> Auto-Instrumentation is currently in Private Beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}. Segment is actively iterating on and improving the Auto-Instrumentation user experience.

> success "Auto-Instrumentation access"
> To turn Auto-Instrumentation on in your Segment workspace, reach out to your dedicated account manager.
> info "Auto-Instrumentation in public beta"
> Auto-Instrumentation is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.

## Step 1: Get your source write key

You need the `writeKey` from an existing Segment source:
You need the `writeKey` from an existing Segment source. To find it:

1. In your Segment workspace, go to **Connections > Sources**.
2. Select your source.
Expand All @@ -24,7 +21,7 @@ You need the `writeKey` from an existing Segment source:

## Step 2: Add dependencies and initialization code

Next, you'll need to add the Signals SDKs to your Swift applicatiion.
Next, add the Signals SDKs to your Swift applicatiion.

1. Use Swift Package Manager to add the Signals SDK from the following repository:

Expand All @@ -35,7 +32,7 @@ Next, you'll need to add the Signals SDKs to your Swift applicatiion.
2. Add the initialization code and configuration options:

> success ""
> see [configuration options](#configuration-options) for a complete list.
> See [configuration options](#configuration-options) for a complete list.

```swift
// Configure Analytics with your settings
Expand All @@ -58,11 +55,11 @@ Next, you'll need to add the Signals SDKs to your Swift applicatiion.
Analytics.main.add(plugin: Signals.shared)
```

Verify that you replaced `<WRITE_KEY>` with the actual write key you copied in Step 1.
Verify that you replaced `<WRITE_KEY>` with the actual write key you copied in [Step 1](#step-1-get-your-source-write-key).

#### SwiftUI projects

If your app is written in SwiftUI, you'll need to add a `TypeAlias.swift` file to your project that captures interaction and navigation Signals, like in this example:
If your app is written in SwiftUI, you need to add a `TypeAlias.swift` file to your project that captures interaction and navigation Signals, like in this example:

```swift
import Foundation
Expand Down Expand Up @@ -96,7 +93,7 @@ After integrating the SDK and running your app, verify that Segment is collectin
4. Use the app as a user would: navigate between screens, tap buttons, trigger network requests. Signals appear in real time as you interact with the app.
5. In the Event Builder, find a signal and click **Configure event** to define a new event. After configuring the event, click **Publish event rules**.

## Configuration Options
## Configuration options

Using the Signals Configuration object, you can control the destination, frequency, and types of signals that Segment automatically tracks within your application. The following table details the configuration options for Signals-Swift.

Expand Down
23 changes: 10 additions & 13 deletions src/connections/auto-instrumentation/web-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ hidden: true

This guide outlines the steps required to set up the Signals SDK in your JavaScript website.

You'll learn how to connect an existing source, integrate dependencies, turn on Auto-Instrumentation, and verify that your setup captures and processes data as intended.
Learn how to connect an existing source, integrate dependencies, turn on Auto-Instrumentation, and verify that your setup captures and processes data as intended.

> info "Auto-Instrumentation Private Beta"
> Auto-Instrumentation is currently in Private Beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}. Segment is actively iterating on and improving the Auto-Instrumentation user experience.

> success "Auto-Instrumentation access"
> To turn Auto-Instrumentation on in your Segment workspace, reach out to your dedicated account manager.
> info "Auto-Instrumentation in public beta"
> Auto-Instrumentation is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.

## Step 1: Get your source write key

You need the `writeKey` from an existing Segment source:
You need the `writeKey` from an existing Segment source. To find it:

1. In your Segment workspace, go to **Connections > Sources**.
2. Select your source.
Expand All @@ -24,7 +21,7 @@ You need the `writeKey` from an existing Segment source:

## Step 2: Add dependencies and initialization code

Next, you'll need to add the Signals SDKs to your web environment.
Next, add the Signals SDKs to your web environment.

Choose the installation method that matches your setup:

Expand Down Expand Up @@ -150,7 +147,7 @@ If your site uses the standard Segment snippet, **replace it** with the followin
</head>
```

Verify that you only have **one snippet** in your site, then move to [Step 3: Verify and deploy events](#step-3-verify-and-deploy-events).
Verify that you only have **one snippet** in your site, then move on to [Step 4: Verify and deploy events](#step-4-verify-and-deploy-events).

### Option B: Install with a package manager

Expand Down Expand Up @@ -205,11 +202,11 @@ After integrating the SDK and running your app, verify that Segment is collectin
1. In your Segment workspace, go to **Connections > Sources** and select the source you used for Auto-Instrumentation.
2. In the source overview, look for the **Event Builder** tab. If the tab doesn’t appear:
- Make sure you've installed the SDK correctly.
- Reach out to your Segment CSM to confirm that your workspace has the necessary feature flags enabled.
- Verify that Auto Instrumentation is enabled in **Settings > Analytics.js**.
![The Event Builder tab shown in the navigation bar between Debugger and Schema in a Segment Source](images/event_builder_tab.png)

3. Open the **Event Builder** and follow the on-screen instructions to start signal detection.
- To collect signals in the UI, visit your site in a browser using the query string:`?segment_signals_debug=true`
- To collect signals in the UI, visit your site in a browser using the query string:`?segment_signals_debug=true`.
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.
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**.

Expand Down Expand Up @@ -279,15 +276,15 @@ const signalsPlugin = new SignalsPlugin({
analytics.register(signalsPlugin);
```

#### Sandbox Strategies
#### Sandbox strategies

If you get CSP errors, you can use the experimental 'global' sandbox strategy:

```ts
new SignalsPlugin({ sandboxStrategy: "global" });
```

## Configuration Options
## Configuration options

Using the Signals Configuration object, you can control the destination, frequency, and types of signals that Segment automatically tracks within your application. The following table details the configuration options for Signals Web.

Expand Down
Loading