Skip to content
Open Screeb

Keep user properties and events on the device instead of sending them to Screeb, and know the trade-offs.

Screeb can track users in two ways:

  • Screeb tracking (the default): properties and events go to the Screeb backend, where they feed targeting and analytics.
  • Device tracking: properties and events stay on the user’s device, in the browser storage. Only surveys go through Screeb.

Device tracking is available on the JavaScript tag only, and Screeb turns it on for your workspace on request.

  1. Your app sends the user’s identity, properties and events to the SDK.
  2. The SDK sends them to the Screeb backend, which stores them and runs the targeting checks.
  3. When the user matches a survey, the backend sends it to the SDK, which displays it.

Events from every device of a user are attached to the same identity, and all of them are available in Screeb analytics. Triggering a survey on an event can take up to about 20 seconds.

$screeb("init", "<YOUR-CHANNEL-ID>", {
identity: {
id: "<USER-ID>",
properties: {
plan: "pro",
last_seen_at: new Date(),
authenticated: true,
},
},
});
$screeb("identity", "<USER-ID>", { plan: "pro", signed_up_at: new Date() });
$screeb("identity.properties", { plan: "pro", logged: true });
$screeb("event.track", "product_added_to_cart");
$screeb("identity.group.assign", "company", "Acme Inc");
$screeb("identity.group.unassign", "plan", "growth");
Screeb.initSdk(
this,
"<YOUR-CHANNEL-ID>",
"<USER-ID>",
VisitorProperties().apply {
this["plan"] = "pro"
this["authenticated"] = true
},
)
Screeb.setIdentity("<USER-ID>")
Screeb.setVisitorProperties(VisitorProperties().apply { this["plan"] = "pro" })
Screeb.trackEvent("product_removed_from_cart")
Screeb.assignGroup("company", "Acme Inc")
Screeb.unassignGroup("plan", "growth")
Screeb.initSdk(
context: window?.rootViewController,
channelId: "<YOUR-CHANNEL-ID>",
identity: "<USER-ID>",
visitorProperty: ["plan": "pro", "authenticated": true]
)
Screeb.setIdentity(uniqueVisitorId: "<USER-ID>")
Screeb.visitorProperty(visitorProperty: ["plan": "pro"])
Screeb.trackEvent(name: "product_removed_from_cart")
Screeb.assignGroup(type: "company", name: "Acme Inc")
Screeb.unassignGroup(type: "plan", name: "growth")
import {
assignGroup,
initSdk,
setIdentity,
setProperties,
trackEvent,
unassignGroup,
} from "@screeb/react-native";
initSdk("<YOUR-CHANNEL-ID>", "<USER-ID>", { plan: "pro", authenticated: true });
setIdentity("<USER-ID>");
setProperties({ plan: "pro" });
trackEvent("product_removed_from_cart");
assignGroup("company", "Acme Inc");
unassignGroup("plan", "growth");
PluginScreeb.initSdk("<YOUR-CHANNEL-ID>", userId: "<USER-ID>", properties: {"plan": "pro", "authenticated": true});
PluginScreeb.setIdentity("<USER-ID>");
PluginScreeb.setProperties({"plan": "pro"});
PluginScreeb.trackEvent("product_removed_from_cart");
PluginScreeb.assignGroup("company", "Acme Inc");
PluginScreeb.unassignGroup("plan", "growth", null);
  1. Your app sends the user’s identity, properties and events to the SDK.
  2. The SDK stores them in the browser and runs the targeting checks itself.
  3. When the user matches a survey, the SDK asks the Screeb backend for it and displays it.

Properties and events never reach Screeb, which is better for privacy, and a survey triggered by an event shows at once. In exchange, targeting only sees what happened on the current device, and the data is not in Screeb analytics.

The browser keeps up to 2,000 events, for up to 90 days: expect about 150 KB of storage.

Once device tracking is on for your workspace, the usual commands store on the device: init with an identity, identity, identity.properties and event.track need no change. Group assignment is not available: identity.group.assign and identity.group.unassign fail.

Two commands remain from earlier versions of the tag: device.identity.properties behaves like identity.properties, and device.event.track is a deprecated alias of event.track.

Pick Screeb tracking when you need properties and events in Screeb analytics or to analyze responses. Pick device tracking for apps with a high volume of events used mostly to trigger surveys.

Screeb tracking Device tracking
Strengths Advanced survey targeting, segment analytics, funnel reports, response analysis by user property Surveys display faster, more events can drive survey displays
Limits Surveys take longer to display, fewer events allowed by your plan Partial data on the Screeb home page, no segment analytics or funnel reports, no response analysis by user property, no question variables from device properties

Do not declare the same property or event in both places: when you need a mix, give them different names.