Telegram Mini Apps Analytics SDK
  • Overview
  • SDK
    • Preparations
    • Installation via <script> tag
    • Installation via NPM package
  • API
    • Endpoints
  • Supported events
  • Bot
  • FAQ
    • How can I check the integration status of the SDK?
Powered by GitBook
On this page
  • 1. Connect the TON Connect SDK
  • 2. Get the token with @DataChief_bot
  • 3. Initialize SDK
  • Navigation:
  1. SDK

Preparations

Preparations before connection

PreviousOverviewNextInstallation via <script> tag

Last updated 4 months ago

1. Connect the TON Connect SDK

Web3 events for the Telegram Mini Apps Analytics SDK are supported by the @tonconnect/ui and @tonconnect/ui-react libraries since version 2.0.3, @tonconnect/sdk since version 3.0.3.

Read more about TON Connect integration

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

2. Get the token with @DataChief_bot

Initiate a conversation with our Data Chief. It will assist you in generating a unique access token required for the analytics records. Additionally, you can manage your existing tokens through this bot.

Provide to Data Chief bot your Telegram Bot URL, and domain where your mini app is hosted and you will receive a token to initialize the SDK.

3. Initialize SDK

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

  • via <script> tag (See Installation via <script> tag page)

  • via NPM package (See Installation via NPM package page)


Navigation:

  • Overview

  • SDK installation:

    • preparations

    • via <script> tag

    • via NPM package

  • API docs

  • Supported events

  • Bot

  • Demo app