> For the complete documentation index, see [llms.txt](https://docs.keewano.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keewano.com/sdks/unity.md).

# Unity SDK

Install and configure the Keewano SDK in a Unity project.

Integration is a package import and an API key in Project Settings. Automatic tracking starts from there; manual and custom events give the Keewano AI agents more to work with.

## 1. Install

1. Download the UnityPackage from the [GitHub Releases page](https://github.com/Keewano/Keewano-UnitySDK/releases).
2. Import it into your Unity project.

## 2. Configure your project

Open **Edit → Project Settings → Keewano** and enter your project's API key.

## 3. Identify your users

Associate your in-game user id with the current installation so Keewano can recognise the user across devices:

```csharp
KeewanoSDK.SetUserId(USER_ID);
```

Two overloads are available — one for products that use numeric user ids (`UInt64`), one for those that use GUIDs.

## 4. Report events

The SDK starts reporting some events automatically. Adding manual and custom events on top is what gives the AI agents knowledge of behaviour specific to your product — purchases, ad revenue, item exchanges, onboarding milestones.

```csharp
KeewanoSDK.ReportButtonClick("Play");
```

***

## Privacy

By default the SDK is fully compliant with privacy regulations and collects **no personally identifiable information**. No additional setup is required.

If your project requires explicit user consent before any analytics data is sent, see [Data Privacy](https://keewano.github.io/Keewano-UnitySDK/DataPrivacy.html) in the SDK docs.

## Button click tracking

By default the SDK captures all Unity UI button click events, which gives the AI Analyst context about user behaviour. You can disable this with the **Disable Button Tracking** option in Project Settings.

{% hint style="warning" %}
Disabling automatic capture is **not recommended** — button clicks are a major source of behavioural context. Manual tracking via `KeewanoSDK.ReportButtonClick()` still works if you turn automatic tracking off.
{% endhint %}

## Adding to an existing game

If you are adding the SDK to a game that already has a player base, see [Integrating SDK into Existing Games](https://keewano.github.io/Keewano-UnitySDK/ExistingGameIntegration.html) for how to identify users you already have.

***

## Full documentation

**Start here**

|                                                                           |                                  |
| ------------------------------------------------------------------------- | -------------------------------- |
| [Quick Start](https://keewano.github.io/Keewano-UnitySDK/QuickStart.html) | Install, configure, first events |
| [Event Types](https://keewano.github.io/Keewano-UnitySDK/EventTypes.html) | The full map of events           |

**Reporting events**

|                                                                                              |                                        |
| -------------------------------------------------------------------------------------------- | -------------------------------------- |
| [Windows](https://keewano.github.io/Keewano-UnitySDK/Windows.html)                           | Button clicks, windows, and popups     |
| [In-App Purchases](https://keewano.github.io/Keewano-UnitySDK/InAppPurchases.html)           | Purchases and granted items            |
| [Ad Revenue](https://keewano.github.io/Keewano-UnitySDK/AdRevenue.html)                      | Ad offers, revenue, and rewarded items |
| [Subscription Revenue](https://keewano.github.io/Keewano-UnitySDK/SubscriptionRevenue.html)  | Recurring revenue and perks            |
| [Item Exchange](https://keewano.github.io/Keewano-UnitySDK/ItemExchange.html)                | Exchanges and inventory resets         |
| [Onboarding Milestone](https://keewano.github.io/Keewano-UnitySDK/onboarding_milestone.html) | Progression milestones                 |
| [Install Campaign](https://keewano.github.io/Keewano-UnitySDK/install_campaign.html)         | Attribution and campaign reporting     |
| [Custom Events](https://keewano.github.io/Keewano-UnitySDK/CustomEventsPage.html)            | Your own typed events                  |

**Going further**

|                                                                                                      |                                                                                                      |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [Data Privacy](https://keewano.github.io/Keewano-UnitySDK/DataPrivacy.html)                          | Consent and PII                                                                                      |
| [Offline Analytics](https://keewano.github.io/Keewano-UnitySDK/OfflineAnalytics.html)                | Behaviour without a connection                                                                       |
| [Integration Testing](https://keewano.github.io/Keewano-UnitySDK/IntegrationTesting.html)            | Verifying your integration                                                                           |
| [Existing Game Integration](https://keewano.github.io/Keewano-UnitySDK/ExistingGameIntegration.html) | Adding the SDK to a game with an established player base                                             |
| [Sample Game Integration](https://keewano.github.io/Keewano-UnitySDK/DummyGameIntegration.html)      | A worked end-to-end example                                                                          |
| [Claude Code Skill](https://keewano.github.io/Keewano-UnitySDK/ClaudeCodeSkill.html)                 | The AI integration partner — see [Install with AI](https://docs.keewano.com/sdks/install-with-ai.md) |
| [Data Format](https://keewano.github.io/Keewano-UnitySDK/DataFormatSpecs.html)                       | The wire format                                                                                      |
| [API Reference](https://keewano.github.io/Keewano-UnitySDK/classKeewanoSDK.html)                     | Generated class reference                                                                            |
| [All guides](https://keewano.github.io/Keewano-UnitySDK/)                                            | The SDK's own documentation site                                                                     |

Docs site: [keewano.github.io/Keewano-UnitySDK](https://keewano.github.io/Keewano-UnitySDK/) · Source: [github.com/Keewano/Keewano-UnitySDK](https://github.com/Keewano/Keewano-UnitySDK)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keewano.com/sdks/unity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
