---
name: g-less-unity-telemetry
description: Install and integrate the G-Less Unity telemetry SDK in PC or Steam games. Use when adding G-Less to a Unity project, configuring project credentials and release context, instrumenting sessions, runs, matchmaking, progression, economy, interactions or custom events, or validating safe offline delivery and player opt-out.
---

# G-Less Unity Telemetry

Integrate G-Less without putting network or disk work on gameplay paths. Preserve existing game architecture and instrument only confirmed state transitions.

## Workflow

1. Inspect the Unity version, package layout, bootstrap path, game-state boundaries and existing privacy setting.
2. Download the pinned package from `https://g-less.com/sdk/unity/GlessTelemetry-Unity-0.1.0.zip` and add `com.gless.telemetry` under `Packages/`.
3. Ask the user for the project UUID and append-only write key if they are unavailable. Never invent, log or commit credentials.
4. Configure endpoint `https://g-less.com/api/v1/telemetry/ingest`, a stable channel and a unique Build ID for each materially different binary.
5. Add a localized anonymous-telemetry toggle and call `GlessTelemetry.SetEnabled` immediately when it changes.
6. Instrument the smallest useful path first: application session is automatic; mark run start/end, then add low-cardinality gameplay events.
7. Enter Play Mode, verify `session_start` in Live events under Development, test a run, then validate offline replay and a packaged player build.

## Integration rules

- Call `GlessTelemetry.Configure` once during bootstrap before gameplay instrumentation.
- Use `StartRun` and `EndRun` for each playable attempt. Use stable outcome values such as `completed`, `won`, `lost`, `quit_to_lobby` or `abandoned`.
- Emit matchmaking attempts before a search and results only after a terminal outcome.
- Record progression, purchases, upgrades, quests and interactions only after the game accepts the action.
- Keep event names and property keys stable `snake_case`; avoid timestamps, raw coordinates, object IDs, paths, chat and player-generated text.
- Use project-defined low-cardinality category and mode values. Do not encode them into event names.
- Use `TrackCustomEvent` only when a typed method does not fit. Keep at most 32 small scalar properties.
- Never block gameplay or shutdown waiting for telemetry. Do not add per-frame flushing or custom synchronous file/network code.
- Preserve the SDK's anonymous installation ID fallback. Never transmit raw Steam IDs, display names, emails or other direct identifiers.

## Minimal example

```csharp
GlessTelemetry.Configure(new GlessTelemetryConfig {
    endpoint = "https://g-less.com/api/v1/telemetry/ingest",
    projectId = "YOUR_PROJECT_UUID",
    writeKey = "gls_pk_YOUR_WRITE_KEY",
    channel = "demo",
    buildId = "YOUR_GAME_BUILD"
});

GlessTelemetry.StartRun("standard", "cooperative", 1, 0);
GlessTelemetry.TrackProgression("tutorial", "complete", 1);
GlessTelemetry.EndRun("completed", finalScore);
```

## Validate

- Confirm the installed package version is `0.1.0` and protocol version is `4`.
- Confirm missing configuration leaves collection inactive without breaking the game.
- Confirm opt-out makes later calls no-ops and removes unsent events asynchronously.
- Confirm two builds use different Build IDs so the dashboard can compare them.
- Consult the human-readable API reference at `https://g-less.com/sdk/unity/api`; do not treat this skill as the API reference.
