Skip to main content

For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/sources/mobile-trackers/signals.md. The index of all documentation pages is at https://docs.snowplow.io/llms.txt, and the index for this section is at https://docs.snowplow.io/docs/cdi/llms.txt.

Use Signals attributes and interventions in your app

The iOS and Android trackers can connect your app to Signals, so that it can react to the user's behavior in real time. Once configured, the tracker's Signals controller lets you:

The app's user and session are identified by the userId and sessionId from the session entity. In Signals, these correspond to the built-in client_session_user_id and client_session_session_id attribute keys. Define your attribute groups, services, and interventions with these keys to use them from your app. The tracker subscribes to interventions with these identifiers automatically. To read attributes, pass the attribute key and the identifier from tracker.session.

Tracker versions

Signals support is available from version 6.5.0 of the iOS tracker and version 6.6.1 of the Android tracker.

Configure the tracker​

Pass a SignalsConfiguration with your Signals API URL when creating the tracker. You'll find the URL on the Signals > Overview page in Console. The app doesn't need an API key.

swift
let signalsConfig = SignalsConfiguration(endpoint: "https://000000000000.signals.snowplowanalytics.com")
.timeout(5) // seconds, for attribute reads

let tracker = Snowplow.createTracker(
namespace: "appTracker",
network: NetworkConfiguration(endpoint: "https://collector.example.com"),
configurations: [signalsConfig]
)

The timeout is optional and defaults to five seconds. If you omit the URL scheme, the tracker uses https://.

Access the Signals controller with tracker.signals, or tracker.getSignals() in Java. Without a SignalsConfiguration, its methods log a message and don't send any requests.

Requirements for interventions​

The tracker subscribes to interventions using the session identifiers. It doesn't subscribe when:

  • Session tracking is disabled
  • The tracker hasn't tracked an event in the current session yet

Requests go straight from the app to Signals, without cookies or caching.

Use Signals in your app​

To read attributes, see Read attributes from websites and apps. The service must have the public access mode.

To receive interventions, see Subscribe with the mobile trackers.

Was this page helpful?