> ## Documentation Index
> Fetch the complete documentation index at: https://companyname-a7d5b98e-add-how-to-burning.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Preparation

# Preparations

### Connect the TON Connect SDK

Web3 events for the Telegram Mini Apps Analytics SDK are supported by the [`@tonconnect/ui`](https://www.npmjs.com/package/@tonconnect/ui) and [`@tonconnect/ui-react`](https://www.npmjs.com/package/@tonconnect/ui-react) libraries since version 2.0.3, [`@tonconnect/sdk`](https://www.npmjs.com/package/@tonconnect/sdk) since version 3.0.3.

[Read more about TON Connect integration](https://github.com/ton-connect)

Don't worry if your app doesn't use TON Connect; the analytics SDK will still work and collect non-Web3 events.

### Get the token with TON Builders

Register your project on [TON Builders](https://builders.ton.org) and go to the Analytics tab.

<img src="https://mintcdn.com/companyname-a7d5b98e-add-how-to-burning/RWsLyuKk6jYcm4uS/resources/images/tma-analytics/analytics-preparations-1.png?fit=max&auto=format&n=RWsLyuKk6jYcm4uS&q=85&s=1ea7df4485fed739104c26d5fffd4a28" alt="" width="2880" height="1856" data-path="resources/images/tma-analytics/analytics-preparations-1.png" />

Enter your Telegram Bot URL and mini app domain to receive an **API key** for SDK initialization. You can also manage your existing keys from the same section. Enter your Telegram Bot URL and mini app domain to receive a token for SDK initialization.

### Initialize SDK

Now you can initialize the SDK in your application. There are two ways to do this:

* [Install with script tag](/ecosystem/tma/analytics/install-via-script)
* [Install with NPM package](/ecosystem/tma/analytics/install-via-npm)
