Reference
Complete reference for the Screeb .NET MAUI SDK.
โจ New to Screeb? Start with the Install guide.
Methods by capabilityโ
Lifecycleโ
| Method | Description | More |
|---|---|---|
InitSdk(string channelId, string? userId = null, Dictionary<string, object>? properties = null, ScreebHooks? hooks = null, ScreebInitOptions? initOptions = null, string? language = null): Task<bool?> | Initialize the Screeb SDK. Must be called before any other method. | ๐ |
CloseSdk(): Task<bool?> | Stop the SDK. Opposite of InitSdk. | ๐ |
Identityโ
| Method | Description | More |
|---|---|---|
SetIdentity(string userId, Dictionary<string, object>? properties = null): Task<bool?> | Identify the current user with optional properties. | ๐ |
SetProperties(Dictionary<string, object>? properties = null): Task<bool?> | Send visitor properties without changing the identity. | ๐ |
ResetIdentity(): Task<bool?> | Reset user identity (e.g. on logout). | ๐ |
GetIdentity(): Task<Dictionary<string, object>?> | Get current visitor identity and properties. | ๐ |
Groupsโ
| Method | Description | More |
|---|---|---|
AssignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?> | Assign the current user to a group. | ๐ |
UnassignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?> | Remove the current user from a group. | ๐ |
Trackingโ
| Method | Description | More |
|---|---|---|
TrackEvent(string name, Dictionary<string, object>? properties = null): Task<bool?> | Track a custom event. | ๐ |
TrackScreen(string name, Dictionary<string, object>? properties = null): Task<bool?> | Track a screen navigation event. | ๐ |
Surveysโ
| Method | Description | More |
|---|---|---|
StartSurvey(string surveyId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreSurveyStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?> | Start a specific survey programmatically. | ๐ |
CloseSurvey(string? surveyId = null): Task<bool?> | Close the currently displayed survey. | - |
Messagesโ
| Method | Description | More |
|---|---|---|
StartMessage(string messageId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreMessageStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?> | Start a specific message programmatically. | ๐ |
CloseMessage(string? messageId = null): Task<bool?> | Close the currently displayed message. | ๐ |
Session replayโ
| Method | Description | More |
|---|---|---|
SessionReplayStart(): Task<bool?> | Start session replay recording. | ๐ |
SessionReplayStop(): Task<bool?> | Stop session replay recording. | ๐ |
Debugโ
| Method | Description | More |
|---|---|---|
Debug(): Task<string?> | Get SDK debug information. | ๐ |
DebugTargeting(): Task<string?> | Get targeting debug information (why surveys aren't showing). | ๐ |
Privacy helpersโ
| Method | Description | More |
|---|---|---|
ScreebMaskText(this T element): T | Mask a view or component in session replay. | ๐ |
ScreebNoCapture(this T element): T | Exclude a view or component from session replay capture. | ๐ |
ScreebId(this T element, string id): T | Set a stable Screeb element ID for IAM targeting. | ๐ |
API signaturesโ
Lifecycleโ
InitSdk(string channelId, string? userId = null, Dictionary<string, object>? properties = null, ScreebHooks? hooks = null, ScreebInitOptions? initOptions = null, string? language = null): Task<bool?>
CloseSdk(): Task<bool?>
Identityโ
SetIdentity(string userId, Dictionary<string, object>? properties = null): Task<bool?>
SetProperties(Dictionary<string, object>? properties = null): Task<bool?>
ResetIdentity(): Task<bool?>
GetIdentity(): Task<Dictionary<string, object>?>
Groupsโ
AssignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?>
UnassignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?>
Trackingโ
TrackEvent(string name, Dictionary<string, object>? properties = null): Task<bool?>
TrackScreen(string name, Dictionary<string, object>? properties = null): Task<bool?>
Surveysโ
StartSurvey(string surveyId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreSurveyStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?>
CloseSurvey(string? surveyId = null): Task<bool?>
Messagesโ
StartMessage(string messageId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreMessageStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?>
CloseMessage(string? messageId = null): Task<bool?>
Session replayโ
SessionReplayStart(): Task<bool?>
SessionReplayStop(): Task<bool?>
Debugโ
Debug(): Task<string?>
DebugTargeting(): Task<string?>
Privacy helpersโ
ScreebMaskText(this T element): T
ScreebNoCapture(this T element): T
ScreebId(this T element, string id): T
Hooksโ
Hooks can be passed to initialization and programmatic survey/message starts. Callback payloads are forwarded as JSON strings by the mobile wrappers.
var hooks = new ScreebHooks
{
Version = "1.0.0",
Callbacks =
{
["onSurveyShowed"] = async payload =>
{
// handle hook payload
return null;
},
},
};
For complete hook payload definitions, see the JS tag hooks reference.
Privacy helpersโ
entry.ScreebMaskText();
view.ScreebNoCapture();
button.ScreebId("checkout-button");
Type definitionsโ
public class ScreebHooks
{
/// <summary>Hooks version identifier passed verbatim to the native SDK.</summary>
public required string Version { get; set; }
/// <summary>
/// Hook callbacks: key = hook name (e.g. "onSurveyShowed"),
/// value = async callback receiving the JSON payload string.
/// </summary>
public Dictionary<string, Func<string, Task<object?>>> Callbacks { get; set; } = new();
}
public class ScreebInitOptions
{
public bool IsDebugMode { get; set; } = false;
public bool DisableMirror { get; set; } = false;
}