Skip to main content

Interaction Tracking

Generates: Spans

An interaction is a single span that represents a meaningful user flow — defined in the Pulse dashboard as a named sequence of signals. Those signals can be automatic telemetry (network requests, screen transitions, tap events) or custom events emitted via trackEvent. When the sequence completes, the SDK emits a span with total duration and an Apdex score.

How It Works

You define flows in the Pulse dashboard: a named sequence of signal names that constitutes one user journey (e.g. "Add to Cart" = product_viewadd_to_cartcheckout_started).

The SDK fetches these definitions on launch via Remote Config. As signals fire — automatically or from your trackEvent calls — the instrumentation matches them in real time. When a sequence completes, a span is emitted from the first signal to the last.

Setup

Interaction tracking is on by default. No code changes are needed — flow definitions are delivered automatically via remote config.

// To disable:
config.interaction { $0.enabled(false) }

Only override the config URL if your backend serves definitions from a non-standard host:

config.interaction { interaction in
interaction.setConfigUrl { "https://custom-host.example.com/v1/interactions/all-active-interactions" }
}

Feeding Custom Events

If your flow includes custom events, emit them via trackEvent with names that match what you configured in the dashboard:

Pulse.shared.trackEvent(name: "product_view",     params: ["product.id": AttributeValue.string("SKU-42")])
Pulse.shared.trackEvent(name: "add_to_cart", params: ["product.id": AttributeValue.string("SKU-42")])
Pulse.shared.trackEvent(name: "checkout_started", params: [:])

See Custom Events for the full API.

Attributes

AttributeDescription
pulse.typeAlways "interaction"
pulse.interaction.nameFlow name from the dashboard
pulse.interaction.idUnique ID of this completed instance
pulse.interaction.apdex_scoreApdex score (0.0–1.0)
pulse.interaction.user_category"satisfied", "tolerable", or "frustrated"
session.idCurrent session identifier
(event props)Attributes from each matching signal are merged onto the span

Apdex Scoring

Each flow definition in the dashboard has time thresholds:

ThresholdMeaning
uptimeLowerLimitInMsBelow this → satisfied
uptimeMidLimitInMsBetween lower and mid → tolerable
uptimeUpperLimitInMsAbove mid → frustrated
thresholdInMsTimeout — sequence abandoned if not completed within this window

If the sequence times out or is interrupted, the span is emitted with status = ERROR.