Skip to main content
Version: .NET MAUI SDK

Reference

Complete reference for the Screeb .NET MAUI SDK.

โœจ New to Screeb? Start with the Install guide.

Methods by capabilityโ€‹

Lifecycleโ€‹

MethodDescriptionMore
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โ€‹

MethodDescriptionMore
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โ€‹

MethodDescriptionMore
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โ€‹

MethodDescriptionMore
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โ€‹

MethodDescriptionMore
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โ€‹

MethodDescriptionMore
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โ€‹

MethodDescriptionMore
SessionReplayStart(): Task<bool?>Start session replay recording.๐Ÿ‘‰
SessionReplayStop(): Task<bool?>Stop session replay recording.๐Ÿ‘‰

Debugโ€‹

MethodDescriptionMore
Debug(): Task<string?>Get SDK debug information.๐Ÿ‘‰
DebugTargeting(): Task<string?>Get targeting debug information (why surveys aren't showing).๐Ÿ‘‰

Privacy helpersโ€‹

MethodDescriptionMore
ScreebMaskText(this T element): TMask a view or component in session replay.๐Ÿ‘‰
ScreebNoCapture(this T element): TExclude a view or component from session replay capture.๐Ÿ‘‰
ScreebId(this T element, string id): TSet 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;
}