Understand your players, and find out what went wrong.
Your game reports to Flock over two separate surfaces. They answer different questions, are read
by different people, and appear on different dashboards. Picking the wrong one puts your data
somewhere real but useless — so it is worth two minutes up front.
Scope: events and analytics are aggregated per game.
Analytics
Log events
Answers
What did players do?
What went wrong?
Read by
Design, product, LiveOps
Engineering
Covers
Sessions, screen views, transactions
Debug entries, logic errors, exceptions
Where to read it
Dashboards → Game Metrics
Diagnostics → Events and Diagnostics → Errors
A crash is not a funnel step. Sending one through the other surface does not fail and does not warn —
the entry is accepted, stored, and shown on a dashboard nobody was looking at.
Engagement, retention and monetization, built from the sessions, screen views and transactions your
game reports. Read on Dashboards → Game Metrics. How each number is counted is in
Metric Definitions.
Dashboard
Unity
Unreal
Engagement, retention, and monetization dashboards in Flock.
Sessions start and end automatically around sign-in. Screen views tell you where players spend
their time, and purchases made through Flock report their own transactions with no call from you.
Gameplay events — a level completed, an item viewed — go through TrackEvent, never through a log
entry. The examples run inside an async method; receiptId stands for your own store’s receipt.
using System.Collections.Generic;using Flock;using Flock.Analytics;FlockClient.Instance.Analytics.RecordScreenView("shop");// A gameplay event, with properties the dashboards can chart. False when it was refused// (no consent, an empty or reserved name); the Console says why.bool tracked = FlockClient.Instance.Analytics.TrackEvent("level_complete", new Dictionary<string, object> { { "level", 3 }, { "flawless", true } }, "progression");// A purchase Flock did not make (your own store, for example): record its transaction yourself.await FlockClient.Instance.Analytics.RecordTransactionAsync(4.99, "USD", paymentProvider: "my_store", externalTransactionId: receiptId);// Optional: await delivery of everything queued (before a critical moment).// The result counts what was sent and what the server refused for good.FlockFlushResult flushed = await FlockClient.Instance.Analytics.FlushAsync();
Events are written to disk and delivered while a player is signed in. Never record a purchase made
through Flock’s shop yourself: it is reported already, and would count twice. Everything here is off
when Analytics Enabled (Advanced Settings tab) is unticked.Asking for consent. To ask the player before tracking, tick Analytics Require Explicit
Consent (Advanced Settings tab, Analytics Settings): nothing is tracked until your game records
the answer. The answer is kept across launches.
using Flock;// From your consent screen's buttons.FlockClient.Instance.Analytics.SetConsent(true); // Agreed: tracking starts.FlockClient.Instance.Analytics.SetConsent(false); // Declined or withdrawn: tracking stops.bool tracking = FlockClient.Instance.Analytics.HasConsent;
Withdrawing consent does not delete what is still queued on the device; EraseLocalAnalyticsData()
does. Transactions are recorded either way, as they are kept for the purchase itself.
The Flock | Analytics nodes need no Target pin and are safe no-ops before the SDK initializes.
Sessions start and end automatically around sign-in, and purchases report their own transactions.
Gameplay events — a level completed, an item viewed — go through Flock Track Event
(TrackAnalyticsEvent), never through a log entry, which lives in the Flock | Diagnostics drawer.Build an event’s properties with Make Flock Event Properties and the Flock Event Property
nodes ((Integer), (Float), (String), (Boolean), (String Array)), which keep a number a
number so the dashboards can chart it.
Track a gameplay event with a number property the dashboards can chart.
#include "FlockSubsystem.h"UFlockSubsystem* Sdk = UFlockSubsystem::Get(this); // this: any object in the game's worldSdk->RecordAnalyticsScreenView(TEXT("shop"));Sdk->TrackAnalyticsEvent(TEXT("level_complete"), FFlockCommandData().Set(TEXT("level"), 3).Set(TEXT("flawless"), true), TEXT("progression"));
Events are written to disk and delivered while a player is signed in; one recorded before anyone
signs in is credited to whoever signs in next. Everything here is off when Analytics Enabled is
unticked.
A session is the unit everything else is attributed to, and the SDK manages its whole life for you.
Starts
on sign-in, not at startup — a session belongs to a player, so there is nobody to attribute one to before then
Ends
on sign-out, on quit, and on timeout
Backgrounding
does not end a session — it pauses it, and time spent backgrounded is not counted as playtime
Timeout
a player who comes back after being away longer than the session-timeout setting (30 seconds by default) gets a new session; the old one is closed
That last row is the one worth knowing. Without it, a player who backgrounds your game overnight and
returns in the morning reports a single fourteen-hour session, and every average you build on top of
that is wrong.
Sessions are per sign-in, so a shared device reports one session per player rather than one per
launch. Signing out closes the session before the next player starts theirs.
Withdrawing analytics consent discards the session in progress rather than sending it. Objecting
to further processing is not a request to transmit one last record.
Developer diagnostics, in exactly three categories. Which one you pick decides where the entry
appears.
Category
Appears on
Use for
Debug
Diagnostics → Events
Trace and context — things that are not faults
Error
Diagnostics → Errors
Something wrong that did not raise
Exception
Diagnostics → Errors
A caught failure, with its stack trace
These are for diagnostics, not gameplay. A level-complete recorded as a debug entry lands in
Diagnostics → Events, where nobody building a retention chart will find it — and it will not
appear in Game Metrics at all.
Unity
Unreal
Log calls are synchronous and never block gameplay: they enqueue to an on-disk buffer and the
SDK batches and delivers them for you. Exceptions nobody catches are captured for you (Analytics
Capture Exceptions, Advanced Settings tab, Exceptions). LoadSaveFile stands for your own code.
using System;using System.Collections.Generic;using Flock;// Debug: Diagnostics → EventsFlockClient.Instance.Analytics.LogDiagnosticEvent("matchmaking started", new Dictionary<string, object> { { "queue", "ranked" } });// Error: something wrong that did not raise, with your own code and the check that failedFlockClient.Instance.Analytics.LogDiagnosticError("quest ended with no reward", logicalExpression: "rewards.Count > 0", errorCode: "QUEST_NO_REWARD", errorData: new Dictionary<string, object> { { "quest", "q_17" } });// Exception: a failure you caughttry{ LoadSaveFile();}catch (Exception ex){ FlockClient.Instance.Analytics.LogDiagnosticException(ex);}
These were called LogEvent, LogError and LogException before; the old names still compile,
with a warning naming the new ones.
Log a diagnostic entry: its Message, and Extra Data built with the Flock Metadata nodes when it needs any.
#include "FlockSubsystem.h"#include "Analytics/FlockMetadata.h"UFlockSubsystem* Sdk = UFlockSubsystem::Get(this); // this: any object in the game's worldSdk->LogDiagnosticEvent(TEXT("matchmaking started"), FFlockMetadata().Add(TEXT("queue"), TEXT("ranked")));FFlockLogDetails Details;Details.ErrorCode = TEXT("QUEST_NO_REWARD"); // your own code for this faultDetails.LogicalExpression = TEXT("Rewards.Num() > 0"); // the check that failedDetails.ErrorData = FFlockMetadata().Add(TEXT("quest"), TEXT("q_17")).Values; // what was wrongSdk->LogDiagnosticError(TEXT("quest ended with no reward"), Details);
FFlockLogDetails describes an error or exception: ErrorCode and LogicalExpression (your own
code and the check that failed), ErrorData (what was wrong) and ExtraData (where the player was).Logging returns immediately: entries are written to disk and delivered later, so a call is cheap
and nothing is lost to a crash or a dead network. A run that dies without a clean quit is reported
on the next launch.These nodes live under Flock | Diagnostics, apart from the analytics ones, and their Extra Data is a
map of strings built with the Flock Metadata nodes. They were called Flock Log Event, Error and
Exception (LogAnalyticsEvent and friends) before SDK 1.21.0; the old names still work and the editor
points at the new ones.
If a play session ends without a clean quit — a crash, a hang the player force-killed, or the OS
evicting the game — the SDK detects it on the next launch and reports one app_termination
event automatically. No integration needed.
Property
Meaning
classification
background_kill (killed while backgrounded — normal on mobile) or abnormal (died in the foreground without quitting)
previous_session_id
The session that died
last_alive_at
Approximate time of death
unhandled_exception_count
Exceptions seen that run — context, not proof of a crash
Watch the abnormal rate per game version — a jump after a release is your earliest stability
signal, no crash reporter required. Closing the game normally (in-game quit, Alt-F4, swiping the
app away) never counts as abnormal.
Name things consistently. Whichever surface you are on, a small vocabulary of well-chosen names
makes a dashboard readable and a sprawling one makes it useless.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Qwacks","description":"Developer documentation for the Qwacks platform — Flock, Protokite, and Data Duck.","colors":{"primary":"#0099FF","light":"#33ADFF","dark":"#0077CC"},"logo":{"light":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","dark":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9"},"favicon":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","appearance":{"default":"dark","strict":true},"background":{"image":{"light":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47","dark":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47"},"color":{"light":"#FFFFFF","dark":"#181E2E"}},"navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"Pricing"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"Unity SDK"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"Unreal SDK"}],"primary":{"type":"button","label":"Dashboard","href":"https://flock-saas.qwacks.com"}},"fonts":{"heading":{"family":"Readex Pro"},"body":{"family":"Inter"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"welcome"},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"href":"ar/welcome"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qwacks","hasAudioNarration":false,"actualSubdomain":"qwacks","customDomains":["docs.qwacks.com"],"gitSource":{"type":"github","owner":"qwackstack","repo":"qwacksdocs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af5a22514affe1bdef08994","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"ar","tag":"Flock","count":32},{"language":"en","tag":"Flock","count":32},{"language":"ar","tag":"الميزات","count":23},{"language":"en","tag":"Features","count":23},{"language":"ar","tag":"Qwacks","count":12},{"language":"en","tag":"Qwacks","count":12},{"language":"ar","tag":"بدء الاستخدام","count":11},{"language":"en","tag":"Getting Started","count":11},{"language":"ar","tag":"اللعب الجماعي","count":5},{"language":"ar","tag":"Protokite","count":5},{"language":"ar","tag":"المدفوعات والفوترة","count":5},{"language":"en","tag":"Multiplayer","count":5},{"language":"en","tag":"Protokite","count":5},{"language":"en","tag":"Payments \u0026 Billing","count":5},{"language":"ar","tag":"اللاعبون","count":4},{"language":"ar","tag":"الاقتصاد والمدفوعات","count":4},{"language":"en","tag":"Players","count":4},{"language":"en","tag":"Economy and Payments","count":4},{"language":"ar","tag":"المفاهيم","count":3},{"language":"en","tag":"Concepts","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".nav-logo{height:2.5rem!important;max-width:none!important}#topbar-cta-button .bg-primary-dark{background-color:#feca13!important}#topbar-cta-button:hover .bg-primary-dark{background-color:#f89c1c!important}#topbar-cta-button a,#topbar-cta-button a *{color:#1a1206!important}.qwacks-lang-toggle{display:inline-flex;align-items:center;align-self:center;gap:0.5rem;padding:0.25rem 1rem;border:1px solid rgba(255, 255, 255, 0.1);border-radius:56px;background:transparent;color:#fafafa;font-family:\"Readex Pro\", sans-serif;font-size:0.875rem;line-height:1.25rem;white-space:nowrap;margin-inline-start:auto;margin-inline-end:1rem}.qwacks-lang-toggle__option{color:inherit;text-decoration:none;font-weight:400;opacity:0.3}.qwacks-lang-toggle__option:hover{opacity:0.7}.qwacks-lang-toggle__option.is-active{font-weight:700;opacity:1}@media (min-width: 1024px){#localization-select-trigger{display:none!important}}:is(h1,h2,h3,h4){position:relative}:is(h1,h2,h3,h4)>div.absolute{left:auto;right:auto;inset-inline-end:0}:is(h1,h2,h3,h4)>div.absolute>a{margin-inline:0!important}"},{"filePath":"rtl.css","content":"html[data-current-path^=\"/ar\"]{direction:rtl}[dir=\"rtl\"]{direction:rtl}html[lang=\"ar\"]{direction:rtl}@media (min-width: 1024px){html[lang=\"ar\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}html[lang=\"ar\"] .lg\\:pl-\\[5\\.7rem\\]{padding-left:0.25rem;padding-right:5.7rem}html[lang=\"ar\"] .lg\\:pl-\\[23\\.7rem\\]{padding-left:0.25rem;padding-right:23.7rem}}[dir=\"rtl\"] :is(pre,code,kbd,samp){direction:ltr;text-align:left}[dir=\"rtl\"] :not(pre)>code{unicode-bidi:isolate}[dir=\"rtl\"] pre>*{direction:ltr}[dir=\"rtl\"] .pl-3\\.5{padding-left:0;padding-right:0.875rem}[dir=\"rtl\"] .pl-3{padding-left:0;padding-right:0.75rem}[dir=\"rtl\"] .pl-4{padding-left:0;padding-right:1rem}[dir=\"rtl\"] .pr-3{padding-right:0;padding-left:0.75rem}[dir=\"rtl\"] .pr-4{padding-right:0;padding-left:1rem}[dir=\"rtl\"] .pr-8{padding-right:0;padding-left:2rem}[dir=\"rtl\"] .ml-2{margin-left:0;margin-right:0.5rem}[dir=\"rtl\"] .ml-4{margin-left:0;margin-right:1rem}[dir=\"rtl\"] .-ml-4{margin-left:0;margin-right:-1rem}[dir=\"rtl\"] .-ml-10{margin-left:0;margin-right:-2.5rem}[dir=\"rtl\"] .mr-2{margin-right:0;margin-left:0.5rem}[dir=\"rtl\"] .mr-4{margin-right:0;margin-left:1rem}[dir=\"rtl\"] .text-left{text-align:right}[dir=\"rtl\"] .text-right{text-align:left}[dir=\"rtl\"] .left-0{left:auto;right:0}[dir=\"rtl\"] .right-0{right:auto;left:0}[dir=\"rtl\"] .space-x-2>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-3>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}[dir=\"rtl\"] .border-l{border-left-width:0;border-right-width:1px}[dir=\"rtl\"] .border-r{border-right-width:0;border-left-width:1px}@media (min-width: 1024px){[dir=\"rtl\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}}[dir=\"rtl\"] :is(ul,ol){padding-left:0;padding-right:1.5rem}[dir=\"rtl\"] blockquote{border-left:0;border-right:4px solid currentColor;padding-left:0;padding-right:1rem}[dir=\"rtl\"] :is(th,td){text-align:right}[dir=\"rtl\"] .steps{margin-left:0;margin-right:0.875rem}[dir=\"rtl\"] .step>.absolute:not(.w-px){margin-left:0;margin-right:-13px}[dir=\"rtl\"] .step>:not(.absolute){padding-left:1px;padding-right:2rem}[dir=\"rtl\"] #table-of-contents{padding-inline-start:0.75rem;scrollbar-gutter:stable}[dir=\"rtl\"] #sidebar-content a[style*=\"padding-left\"]{padding-left:0!important;padding-right:1rem!important}[dir=\"rtl\"] .card .absolute{right:auto;left:1.25rem}[dir=\"rtl\"] .card .absolute svg{transform:scaleX(-1)}[dir=\"rtl\"] :is(.qwacks-flip-icon,[data-flip-rtl]) svg{transform:scaleX(-1)}[dir=\"rtl\"] #topbar-cta-button svg{transform:scaleX(-1)}[dir=\"rtl\"] .qwacks-lang-toggle svg{transform:none}[dir=\"rtl\"],[dir=\"rtl\"] body{font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.85}[dir=\"rtl\"] :is(h1,h2,h3,h4,h5,h6){font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.5}[dir=\"rtl\"] :is(pre,code,kbd,samp){font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;line-height:1.6}[dir=\"rtl\"]{font-variant-numeric:lining-nums}"}],"page":{"pagePath":"guides/analytics-and-events","slug":"/guides/analytics-and-events","pageMetadata":{"title":"Analytics and Events","description":"Understand your players, and find out what went wrong.","href":"/guides/analytics-and-events"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Understand your players, and find out what went wrong.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const Scope=({children})=>{const{Info}=_provideComponents()||{};if(!Info)_missingMdxReference(`Info`,true);return _jsxs(Info,{children:[_jsx(`b`,{children:`Scope:`}),` `,children]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage,Tab,Table,Tabs,Tip,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Your game reports to Flock over `,_jsx(_components.strong,{children:`two separate surfaces`}),`. They answer different questions, are read\nby different people, and appear on different dashboards. Picking the wrong one puts your data\nsomewhere real but useless — so it is worth two minutes up front.`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`Scope`,children:_jsxs(Scope,{children:[`events and analytics are aggregated per `,_jsx(_components.strong,{children:`game`}),`.`]})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Analytics`}),_jsx(_components.th,{children:`Log events`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Answers`}),_jsx(_components.td,{children:`What did players do?`}),_jsx(_components.td,{children:`What went wrong?`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Read by`}),_jsx(_components.td,{children:`Design, product, LiveOps`}),_jsx(_components.td,{children:`Engineering`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Covers`}),_jsx(_components.td,{children:`Sessions, screen views, transactions`}),_jsx(_components.td,{children:`Debug entries, logic errors, exceptions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Where to read it`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Dashboards → Game Metrics`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Diagnostics → Events`}),` and `,_jsx(_components.strong,{children:`Diagnostics → Errors`})]})]})]})]}),`\n`,_jsx(_components.p,{children:`A crash is not a funnel step. Sending one through the other surface does not fail and does not warn —\nthe entry is accepted, stored, and shown on a dashboard nobody was looking at.`}),`\n`,_jsx(Heading,{level:`2`,id:`analytics`,children:`Analytics`}),`\n`,_jsxs(_components.p,{children:[`Engagement, retention and monetization, built from the sessions, screen views and transactions your\ngame reports. Read on `,_jsx(_components.strong,{children:`Dashboards → Game Metrics`}),`. How each number is counted is in\n`,_jsx(_components.a,{href:`/guides/metric-definitions`,children:`Metric Definitions`}),`.`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Dashboard`,id:`dashboard`,children:_jsx(Frame,{caption:`Engagement, retention, and monetization dashboards in Flock.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/analytics.png?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=6989a90273f294de969e66c05ac9e67a`,alt:`Analytics dashboards`,\"data-og-width\":`1366`,width:`1366`,\"data-og-height\":`636`,height:`636`,\"data-path\":`images/guides/analytics.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/analytics.png?w=280\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=880bfdece246afecd56ee8793b69a358 280w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/analytics.png?w=560\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=941b26ef8f966ea9aa9af73d38520933 560w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/analytics.png?w=840\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=fa5963840d4f06056320b300d41a1d97 840w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/analytics.png?w=1100\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=3912bb8bdd9cbe614fc8f446f5e96381 1100w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/analytics.png?w=1650\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=52176bb9556053e65fcd1450a5050ab9 1650w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/analytics.png?w=2500\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=eb12981405b2aec4350f0e9935685392 2500w`})})}),_jsxs(Tab,{title:`Unity`,id:`unity`,children:[_jsxs(_components.p,{children:[`Sessions start and end automatically around sign-in. Screen views tell you where players spend\ntheir time, and purchases made through Flock report their own transactions with no call from you.\nGameplay events — a level completed, an item viewed — go through `,_jsx(_components.code,{children:`TrackEvent`}),`, never through a log\nentry. The examples run inside an `,_jsx(_components.code,{children:`async`}),` method; `,_jsx(_components.code,{children:`receiptId`}),` stands for your own store’s receipt.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Collections`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Generic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`RecordScreenView`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shop\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// A gameplay event, with properties the dashboards can chart. False when it was refused`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// (no consent, an empty or reserved name); the Console says why.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`bool`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` tracked`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TrackEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"level_complete\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Dictionary`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> { { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"level\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"flawless\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"progression\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// A purchase Flock did not make (your own store, for example): record its transaction yourself.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`RecordTransactionAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4.99`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` paymentProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my_store\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`externalTransactionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`receiptId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Optional: await delivery of everything queued (before a critical moment).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The result counts what was sent and what the server refused for good.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockFlushResult`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` flushed`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`FlushAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Events are written to disk and delivered while a player is signed in. Never record a purchase made\nthrough Flock’s shop yourself: it is reported already, and would count twice. Everything here is off\nwhen `,_jsx(_components.strong,{children:`Analytics Enabled`}),` (Advanced Settings tab) is unticked.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Asking for consent.`}),` To ask the player before tracking, tick `,_jsx(_components.strong,{children:`Analytics Require Explicit\nConsent`}),` (Advanced Settings tab, `,_jsx(_components.strong,{children:`Analytics Settings`}),`): nothing is tracked until your game records\nthe answer. The answer is kept across launches.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// From your consent screen's buttons.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`SetConsent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Agreed: tracking starts.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`SetConsent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Declined or withdrawn: tracking stops.`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`bool`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` tracking`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`HasConsent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Withdrawing consent does not delete what is still queued on the device; `,_jsx(_components.code,{children:`EraseLocalAnalyticsData()`}),`\ndoes. Transactions are recorded either way, as they are kept for the purchase itself.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal`,children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.em,{children:`Flock | Analytics`}),` nodes need no Target pin and are safe no-ops before the SDK initializes.\nSessions start and end automatically around sign-in, and purchases report their own transactions.\nGameplay events — a level completed, an item viewed — go through `,_jsx(_components.strong,{children:`Flock Track Event`}),`\n(`,_jsx(_components.code,{children:`TrackAnalyticsEvent`}),`), never through a log entry, which lives in the `,_jsx(_components.em,{children:`Flock | Diagnostics`}),` drawer.`]}),_jsxs(_components.p,{children:[`Build an event’s properties with `,_jsx(_components.strong,{children:`Make Flock Event Properties`}),` and the `,_jsx(_components.strong,{children:`Flock Event Property`}),`\nnodes (`,_jsx(_components.em,{children:`(Integer)`}),`, `,_jsx(_components.em,{children:`(Float)`}),`, `,_jsx(_components.em,{children:`(String)`}),`, `,_jsx(_components.em,{children:`(Boolean)`}),`, `,_jsx(_components.em,{children:`(String Array)`}),`), which keep a number a\nnumber so the dashboards can chart it.`]}),_jsx(Frame,{caption:`Track a gameplay event with a number property the dashboards can chart.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/analytics-track-event.png?fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=413722aa5a67703251fc69d20cbb83f1`,alt:`A Level Completed custom event, Make Flock Event Properties, Flock Event Property (Integer) with stars set to 3, then Flock Track Event named level_completed with those properties`,\"data-og-width\":`1090`,width:`1090`,\"data-og-height\":`406`,height:`406`,\"data-path\":`images/sdk/unreal/analytics-track-event.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/analytics-track-event.png?w=280\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=6a02d368a40b1b1959dfdc32a26eb8fa 280w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/analytics-track-event.png?w=560\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=daa001e731ae18ff19a790cf98d6c317 560w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/analytics-track-event.png?w=840\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=12383ba471b57e1a19c3c104d9e94967 840w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/analytics-track-event.png?w=1100\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=ee4d01d8db6b90f4ce5e26a2ccdab602 1100w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/analytics-track-event.png?w=1650\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=60d86009f8a397613a790a09c973d865 1650w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/analytics-track-event.png?w=2500\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=707a569db867109e93786a31ac678afb 2500w`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"FlockSubsystem.h\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // this: any object in the game's world`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`RecordAnalyticsScreenView`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shop\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TrackAnalyticsEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"level_complete\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FFlockCommandData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"level\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"flawless\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"progression\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Events are written to disk and delivered while a player is signed in; one recorded before anyone\nsigns in is credited to whoever signs in next. Everything here is off when `,_jsx(_components.strong,{children:`Analytics Enabled`}),` is\nunticked.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`sessions`,children:`Sessions`}),`\n`,_jsx(_components.p,{children:`A session is the unit everything else is attributed to, and the SDK manages its whole life for you.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Starts`})}),_jsx(_components.td,{children:`on sign-in, not at startup — a session belongs to a player, so there is nobody to attribute one to before then`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Ends`})}),_jsx(_components.td,{children:`on sign-out, on quit, and on timeout`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Backgrounding`})}),_jsxs(_components.td,{children:[`does `,_jsx(_components.strong,{children:`not`}),` end a session — it pauses it, and time spent backgrounded is not counted as playtime`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Timeout`})}),_jsxs(_components.td,{children:[`a player who comes back after being away longer than the session-timeout setting (30 seconds by default) gets a `,_jsx(_components.strong,{children:`new`}),` session; the old one is closed`]})]})]})]}),`\n`,_jsx(_components.p,{children:`That last row is the one worth knowing. Without it, a player who backgrounds your game overnight and\nreturns in the morning reports a single fourteen-hour session, and every average you build on top of\nthat is wrong.`}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Sessions are per sign-in, so a shared device reports one session per player rather than one per\nlaunch. Signing out closes the session before the next player starts theirs.`})}),`\n`,_jsxs(_components.p,{children:[`Withdrawing analytics consent `,_jsx(_components.strong,{children:`discards`}),` the session in progress rather than sending it. Objecting\nto further processing is not a request to transmit one last record.`]}),`\n`,_jsx(Heading,{level:`2`,id:`log-events`,children:`Log events`}),`\n`,_jsx(_components.p,{children:`Developer diagnostics, in exactly three categories. Which one you pick decides where the entry\nappears.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Category`}),_jsx(_components.th,{children:`Appears on`}),_jsx(_components.th,{children:`Use for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Debug`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Diagnostics → Events`})}),_jsx(_components.td,{children:`Trace and context — things that are not faults`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Error`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Diagnostics → Errors`})}),_jsx(_components.td,{children:`Something wrong that did not raise`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Exception`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Diagnostics → Errors`})}),_jsx(_components.td,{children:`A caught failure, with its stack trace`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`These are for diagnostics, not gameplay. A level-complete recorded as a debug entry lands in\n`,_jsx(_components.strong,{children:`Diagnostics → Events`}),`, where nobody building a retention chart will find it — and it will not\nappear in Game Metrics at all.`]})}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-2`,children:[_jsxs(_components.p,{children:[`Log calls are `,_jsx(_components.strong,{children:`synchronous and never block gameplay`}),`: they enqueue to an on-disk buffer and the\nSDK batches and delivers them for you. Exceptions nobody catches are captured for you (`,_jsx(_components.strong,{children:`Analytics\nCapture Exceptions`}),`, Advanced Settings tab, `,_jsx(_components.strong,{children:`Exceptions`}),`). `,_jsx(_components.code,{children:`LoadSaveFile`}),` stands for your own code.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Collections`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Generic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Debug: Diagnostics → Events`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogDiagnosticEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"matchmaking started\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Dictionary`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> { { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"queue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ranked\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Error: something wrong that did not raise, with your own code and the check that failed`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogDiagnosticError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quest ended with no reward\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` logicalExpression`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rewards.Count > 0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`errorCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QUEST_NO_REWARD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` errorData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Dictionary`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> { { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"q_17\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Exception: a failure you caught`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LoadSaveFile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exception`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` ex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Analytics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogDiagnosticException`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`These were called `,_jsx(_components.code,{children:`LogEvent`}),`, `,_jsx(_components.code,{children:`LogError`}),` and `,_jsx(_components.code,{children:`LogException`}),` before; the old names still compile,\nwith a warning naming the new ones.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-2`,children:[_jsx(Frame,{caption:`Log a diagnostic entry: its Message, and Extra Data built with the Flock Metadata nodes when it needs any.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/diagnostics-log-event.png?fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=3e65919548974928a3c23bccd3e96730`,alt:`A Level Loaded custom event wired into Flock Log Diagnostic Event with the Message Loaded the forest level`,\"data-og-width\":`634`,width:`634`,\"data-og-height\":`199`,height:`199`,\"data-path\":`images/sdk/unreal/diagnostics-log-event.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/diagnostics-log-event.png?w=280\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=15305112ae2652427e6684b0b9be695a 280w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/diagnostics-log-event.png?w=560\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=0fd82e268f32b162f9ba8410e77ece17 560w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/diagnostics-log-event.png?w=840\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=5e42d69ac73a52f851ccb49276fc8cea 840w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/diagnostics-log-event.png?w=1100\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=6d59cf5c2e96c04d7e9373faec070f01 1100w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/diagnostics-log-event.png?w=1650\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=8a29627d5b7b7303ba1d79b1cb543f4b 1650w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/diagnostics-log-event.png?w=2500\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=5d02e9cfc2bb3611a4fe0f3b4b566de1 2500w`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"FlockSubsystem.h\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Analytics/FlockMetadata.h\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // this: any object in the game's world`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogDiagnosticEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"matchmaking started\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FFlockMetadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Add`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"queue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ranked\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)));`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`FFlockLogDetails Details;`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Details`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ErrorCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QUEST_NO_REWARD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // your own code for this fault`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Details`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`LogicalExpression`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Rewards.Num() > 0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // the check that failed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Details`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ErrorData`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FFlockMetadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Add`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"q_17\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Values`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // what was wrong`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogDiagnosticError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quest ended with no reward\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), Details);`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`FFlockLogDetails`}),` describes an error or exception: `,_jsx(_components.code,{children:`ErrorCode`}),` and `,_jsx(_components.code,{children:`LogicalExpression`}),` (your own\ncode and the check that failed), `,_jsx(_components.code,{children:`ErrorData`}),` (what was wrong) and `,_jsx(_components.code,{children:`ExtraData`}),` (where the player was).`]}),_jsx(_components.p,{children:`Logging returns immediately: entries are written to disk and delivered later, so a call is cheap\nand nothing is lost to a crash or a dead network. A run that dies without a clean quit is reported\non the next launch.`}),_jsxs(_components.p,{children:[`These nodes live under `,_jsx(_components.em,{children:`Flock | Diagnostics`}),`, apart from the analytics ones, and their Extra Data is a\nmap of strings built with the `,_jsx(_components.strong,{children:`Flock Metadata`}),` nodes. They were called `,_jsx(_components.em,{children:`Flock Log Event`}),`, `,_jsx(_components.em,{children:`Error`}),` and\n`,_jsx(_components.em,{children:`Exception`}),` (`,_jsx(_components.code,{children:`LogAnalyticsEvent`}),` and friends) before SDK 1.21.0; the old names still work and the editor\npoints at the new ones.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`unexpected-termination-detection`,children:`Unexpected-termination detection`}),`\n`,_jsxs(_components.p,{children:[`If a play session ends without a clean quit — a crash, a hang the player force-killed, or the OS\nevicting the game — the SDK detects it on the `,_jsx(_components.strong,{children:`next launch`}),` and reports one `,_jsx(_components.code,{children:`app_termination`}),`\nevent automatically. No integration needed.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Property`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`classification`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`background_kill`}),` (killed while backgrounded — normal on mobile) or `,_jsx(_components.code,{children:`abnormal`}),` (died in the foreground without quitting)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`previous_session_id`})}),_jsx(_components.td,{children:`The session that died`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`last_alive_at`})}),_jsx(_components.td,{children:`Approximate time of death`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unhandled_exception_count`})}),_jsx(_components.td,{children:`Exceptions seen that run — context, not proof of a crash`})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Watch the `,_jsx(_components.code,{children:`abnormal`}),` rate per game version — a jump after a release is your earliest stability\nsignal, no crash reporter required. Closing the game normally (in-game quit, Alt-F4, swiping the\napp away) never counts as `,_jsx(_components.code,{children:`abnormal`}),`.`]})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Name things consistently. Whichever surface you are on, a small vocabulary of well-chosen names\nmakes a dashboard readable and a sprawling one makes it useless.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{Scope,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Analytics and Events","description":"Understand your players, and find out what went wrong.","href":"/guides/analytics-and-events"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Analytics","slug":"analytics","depth":2,"children":[]},{"title":"Sessions","slug":"sessions","depth":2,"children":[]},{"title":"Log events","slug":"log-events","depth":2,"children":[]},{"title":"Unexpected-termination detection","slug":"unexpected-termination-detection","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/qwacks/05763fd4e1d53e37/lang-toggle.js"],"subdomain":"qwacks","siteName":"Qwacks","title":"Analytics and Events - Qwacks","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/guides/analytics-and-events","matchLevel":0},"ar":{"href":"/ar/guides/analytics-and-events","matchLevel":1}}},"lastModified":"2026-11-12T10:37:57.002Z","originalFileLocation":"guides/analytics-and-events.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Understand your players, and find out what went wrong.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Analytics and Events - Qwacks\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand your players, and find out what went wrong.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qwacks\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qwacks.com/guides/analytics-and-events\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=Insights\u0026amp;title=Analytics+and+Events\u0026amp;description=Understand+your+players%2C+and+find+out+what+went+wrong.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=2a029eaddf4ad86b68786a44cf49a116ee060dddc3b4343fe1b304cb0f9c84e7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Analytics and Events - Qwacks\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand your players, and find out what went wrong.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=Insights\u0026amp;title=Analytics+and+Events\u0026amp;description=Understand+your+players%2C+and+find+out+what+went+wrong.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=2a029eaddf4ad86b68786a44cf49a116ee060dddc3b4343fe1b304cb0f9c84e7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0099FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qwacks.com/guides/analytics-and-events\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/analytics-and-events.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.qwacks.com/guides/analytics-and-events\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://docs.qwacks.com/ar/guides/analytics-and-events\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.qwacks.com/guides/analytics-and-events\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qwacks.com/#organization\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qwacks.com#website\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qwacks.com/guides/analytics-and-events#webpage\",\"url\":\"https://docs.qwacks.com/guides/analytics-and-events\",\"name\":\"Analytics and Events\",\"description\":\"Understand your players, and find out what went wrong.\",\"dateModified\":\"2026-11-12T10:37:57.002Z\",\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qwacks.com/guides/analytics-and-events#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qwacks.com/guides/analytics-and-events#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Features\",\"item\":\"https://docs.qwacks.com/guides/players-and-auth\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Analytics and Events\",\"item\":\"https://docs.qwacks.com/guides/analytics-and-events\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.qwacks.com/guides/analytics-and-events#article\",\"headline\":\"Analytics and Events\",\"name\":\"Analytics and Events\",\"description\":\"Understand your players, and find out what went wrong.\",\"url\":\"https://docs.qwacks.com/guides/analytics-and-events\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qwacks.com/guides/analytics-and-events#webpage\"},\"dateModified\":\"2026-11-12T10:37:57.002Z\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qwacks\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Qwacks\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/analytics-and-events.md","siteName":"Qwacks","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Qwacks","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/qwacks.svg","pages":[{"title":"Qwacks","href":"/welcome"}]},{"tab":"Flock","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/flock.svg","groups":[{"group":"Getting Started","pages":[{"title":"Flock","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","href":"/authentication"},{"title":"Unity SDK","href":"/sdk/unity"},{"title":"Unreal SDK","href":"/sdk/unreal"}]},{"group":"Concepts","pages":[{"title":"Studios \u0026 Games","href":"/concepts/studios-and-games"},{"title":"Versions","href":"/concepts/versions"},{"title":"Players","href":"/concepts/players"}]},{"group":"Features","pages":[{"group":"Players","pages":[{"title":"Sign-in","href":"/guides/players-and-auth"},{"title":"Linking Accounts","href":"/guides/account-linking"},{"title":"Player Data","href":"/guides/player-data"},{"title":"Bans","href":"/guides/bans"}]},{"group":"Progress","pages":[{"title":"Achievements","href":"/guides/achievements"},{"title":"Leaderboards","href":"/guides/leaderboards"}]},{"group":"Economy and Payments","pages":[{"title":"Currencies and Wallets","href":"/guides/currencies-and-wallets"},{"title":"Shops and Inventory","href":"/guides/shops-and-inventory"},{"title":"In-App Purchases","href":"/guides/real-money-purchases"},{"title":"Web Payments","href":"/guides/web-checkout"}]},{"group":"Game Content","pages":[{"title":"Remote Config","href":"/guides/remote-config"},{"title":"Game Patches","href":"/guides/game-patches"},{"title":"Game Files","href":"/guides/assets"}]},{"group":"Reaching Players","pages":[{"title":"Player Segments","href":"/guides/segments"},{"title":"Notifications","description":"Send messages to your players — in-app inbox, email, or push.","href":"/guides/notifications"}]},{"group":"Insights","pages":[{"title":"Analytics and Events","href":"/guides/analytics-and-events"},{"title":"Metric Definitions","description":"Exactly how Flock counts each number on your dashboards.","href":"/guides/metric-definitions"},{"title":"Developer Alerts","href":"/guides/developer-alerts"}]},{"group":"Multiplayer","pages":[{"title":"Multiplayer","sidebarTitle":"Overview","href":"/guides/multiplayer"},{"title":"Parties","href":"/guides/parties"},{"title":"Matchmaking","href":"/guides/matchmaking"},{"title":"Sessions","href":"/guides/sessions"},{"title":"Connecting Players","href":"/guides/connecting-players"}]}]},{"group":"Reference","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"tab":"Protokite","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/protokite.svg","pages":[{"title":"Protokite","href":"/protokite/getting-started"}]},{"tab":"Data Duck","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/data-duck.svg","pages":[{"title":"Data Duck","href":"/data-duck/getting-started"}]}]},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"pages":[{"title":"ar","href":"/ar/guides/analytics-and-events"}]}]},"basePath":"","title":"Analytics and Events - Qwacks","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-u3J1-UOn.js","DynamicMarkdown-B-f2cqXQ.js","zoom-image-lightbox-DTFzvaXJ.js","lightbox-handle-r17bVUz3.js"]}