Insightdive 1.2.0
dotnet add package Insightdive --version 1.2.0
NuGet\Install-Package Insightdive -Version 1.2.0
<PackageReference Include="Insightdive" Version="1.2.0" />
<PackageVersion Include="Insightdive" Version="1.2.0" />
<PackageReference Include="Insightdive" />
paket add Insightdive --version 1.2.0
#r "nuget: Insightdive, 1.2.0"
#:package Insightdive@1.2.0
#addin nuget:?package=Insightdive&version=1.2.0
#tool nuget:?package=Insightdive&version=1.2.0
Insightdive .NET / Avalonia SDK
Official .NET SDK for Insightdive — anonymous in-app feedback surveys.
Installation
dotnet add package Insightdive
Quick start (Avalonia)
// App.axaml.cs — configure once at startup
InsightdiveSDK.Configure(new InsightdiveOptions
{
Tenant = "acme",
Survey = "nps-q1",
ApiKey = "your-api-key",
ProductVersion = Assembly.GetEntryAssembly()?.GetName().Version?.ToString(),
ProductIdentifier = "desktop",
Locale = CultureInfo.CurrentCulture.Name,
Theme = "light",
});
// Any Window — show as a modal dialog
if (await InsightdiveSDK.Instance.IsAvailableAsync())
{
var result = await InsightdiveSDK.Instance.ShowAsync(this); // 'this' = Avalonia Window
if (result?.Status == FeedbackStatus.Completed)
Console.WriteLine($"Submitted: {result.SubmissionId}");
}
Event-based triggering
// Show only when a specific SDK event fires
if (await InsightdiveSDK.Instance.TriggerAsync("onboarding_completed"))
await InsightdiveSDK.Instance.ShowAsync(this);
Lifecycle events
InsightdiveSDK.Instance.FeedbackEventOccurred += (_, e) =>
{
switch (e)
{
case FeedbackViewedEvent v: Console.WriteLine($"Viewed session={v.SessionId}"); break;
case FeedbackCompletedEvent c: Console.WriteLine($"Done sub={c.SubmissionId}"); break;
case FeedbackDismissedEvent d: Console.WriteLine($"Closed after={d.Result.Duration}"); break;
}
};
Inline view
// Embed the survey directly in your layout instead of a modal
using Insightdive.Avalonia_;
var opts = InsightdiveSDK.Instance.Options;
var token = await InsightdiveSDK.Instance.FetchEmbedTokenAsync();
var url = UrlBuilder.SurveyUrl(opts, token);
var survey = new InsightdiveSurveyControl(InsightdiveSDK.Instance, url);
survey.EventOccurred += (_, e) => { /* handle events */ };
myPanel.Children.Add(survey);
Pure .NET (no UI)
The netstandard2.0 target exposes the status-checking API without any UI dependency:
InsightdiveSDK.Configure(new InsightdiveOptions
{
Tenant = "acme",
Survey = "nps-q1",
ApiKey = "your-api-key",
});
bool available = await InsightdiveSDK.Instance.IsAvailableAsync();
bool match = await InsightdiveSDK.Instance.TriggerAsync("app_launched");
Screenshot capture
When an insight has screenshot collection enabled (Admin → Insight → Settings → Delivery), ShowAsync(ownerWindow) renders the owner window to a PNG just before the modal opens and attaches it to the response. The screenshot is of the UI — never the user.
- No setup required beyond the existing
ShowAsync(this)call — thenet8.0Avalonia target captures the owner window automatically. - The flag is read from the status endpoint, so call
IsAvailableAsync()/TriggerAsync()beforeShowAsync(). - Capture is best-effort and size-capped; failures are swallowed and the survey still opens.
- Only available on the
net8.0Avalonia target (thenetstandard2.0status-only target has no UI to capture).
Supported targets
| Target framework | Notes |
|---|---|
net8.0 |
Full Avalonia UI (modal + inline WebView + screenshot capture) |
netstandard2.0 |
Status-check API only, no UI |
Operator context fields
Stamp arbitrary application context on every submission — plan tier, feature flags, active surface, A/B cohort — without collecting any user identity. The admin can filter, segment, and run AI analysis per context dimension.
InsightdiveSDK.Configure(new InsightdiveOptions
{
Tenant = "acme",
Survey = "nps-q1",
ApiKey = "ik_abc123...",
Context = new Dictionary<string, object>
{
["plan"] = "enterprise",
["trial_days_remaining"] = 12,
["feature_export_v2"] = true,
["surface"] = "settings",
},
});
Constraints (enforced server-side; invalid entries are silently dropped):
- Max 20 keys per dictionary
- Key format:
[a-z0-9_], max 64 characters - Values:
string, numeric (int,long,double), orbool— no nested objects - String values: max 255 characters
- Total JSON payload: max 4 KB
Context values are visible in Admin → Responses (detail view) and included in CSV exports as context.<key> columns.
Respondent token
Let the operator correlate responses with their own user records — without ever exposing a user identity to Insightdive. Compute an opaque hash server-side and pass it as RespondentToken:
using System.Security.Cryptography;
using System.Text;
static string ComputeToken(string userId, string workspaceSalt)
{
var data = Encoding.UTF8.GetBytes(userId + workspaceSalt);
var hash = SHA256.HashData(data);
return Convert.ToHexString(hash).ToLowerInvariant();
}
InsightdiveSDK.Configure(new InsightdiveOptions
{
Tenant = "acme",
Survey = "nps-q1",
ApiKey = "ik_abc123...",
RespondentToken = ComputeToken(currentUser.Id, "my-secret-salt"),
});
What Insightdive stores: the hash only — no ability to reverse it to a user.
What the operator can do: compute the same hash from their own database and look up all responses for that hash in Admin → Responses.
GDPR note: Insightdive is a processor with no identification capability. The operator (controller) owns the correlation.
Tip: rotate
workspaceSaltif you want to "forget" historical correlations without deleting data.
Constraints: max 128 characters, characters [a-zA-Z0-9-_] only.
Options reference
| Property | Required | Description |
|---|---|---|
Tenant |
Yes | Workspace slug (e.g. "acme") |
Survey |
Yes | Survey slug (e.g. "nps-q1") |
ApiKey |
Yes | Tenant API key from admin settings |
BaseUrl |
No | Override for self-hosted / staging |
ProductVersion |
No | Semver string forwarded to targeting rules |
ProductIdentifier |
No | Surface identifier forwarded to targeting rules |
Locale |
No | BCP 47 locale (e.g. "fr-CA") |
Theme |
No | "light" or "dark" |
Context |
No | Dictionary<string, object> of operator metadata stamped on submissions. See Operator context fields. |
RespondentToken |
No | Opaque hash for operator-side cross-referencing. See Respondent token. |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
-
net8.0
- Avalonia (>= 11.3.16)
- Avalonia.Controls.WebView (>= 11.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.