Skip to main content

Get Started in 3 Steps

1

Create account & project

Sign up at app.dashgram.io and create a project to get your project_id and access_key.
You’ll receive immediate access to the dashboard and API credentials.
2

Choose your path

Select whether you’re building a Telegram Bot or a Telegram Mini App:

Telegram Bot

Use API proxy or SDKs for Python, Go, Node.js

Telegram Mini App

Use JavaScript or React SDKs
3

Integrate & track

Follow the integration steps below. Your analytics will start flowing immediately.

Telegram Bot Integration

The fastest way to get started is using Dashgram’s Bot API proxy. Just point your bot library to our endpoint:
https://bots.dashgram.io/<PROJECT_ID>:<ACCESS_KEY>
Connect your Telegram bot to Dashgram using our API proxy.
  from aiogram import Bot
  from aiogram.client.session.aiohttp import AiohttpSession
  from aiogram.client.telegram import TelegramAPIServer

  session = AiohttpSession(
      api=TelegramAPIServer.from_base('https://bots.dashgram.io/<PROJECT_ID>:<ACCESS_KEY>')
  )

  bot = Bot(token='BOT_TOKEN', session=session)
Or use our SDKs for fine-grained control over your bot data and advanced features:

Telegram Mini App Integration

Add Dashgram to your Mini App with just a few lines of code.

JavaScript SDK (CDN)

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My Mini App</title>
    <!-- Telegram WebApp SDK -->
    <script src="https://telegram.org/js/telegram-web-app.js">
    <!-- Telegram Dashgram SDK -->
    <script src="https://unpkg.com/@dashgram/javascript@latest/dist/dashgram.min.js">/script>
  </head>
  <body>
    <h1>My Mini App</h1>
    <script>
      // Initialize Dashgram
      DashgramMini.init({
        projectId: "your-project-id",
        trackLevel: 3
      })
    </script>
  </body>
</html>
<script>
  DashgramMini.track("purchase_completed", {
    product_id: "premium-plan",
    price: 100,
    currency: "TON"
  })
</script>

React SDK

npm install @dashgram/react
import { DashgramProvider } from "@dashgram/react"

function App() {
  return (
    <DashgramProvider projectId="your-project-id" trackLevel={3}>
      <YourApp />
    </DashgramProvider>
  )
}
import { useTrackEvent } from "@dashgram/react"

function Button() {
const track = useTrackEvent()

return (
<button onClick={() => track("button_clicked", { button: "purchase" })}>
Purchase
</button>
)
}

You’re All Set! 🎉

Your Telegram application is now connected to Dashgram. Analytics data will start flowing immediately.
Visit your dashboard to see real-time metrics and user interactions.
Dashboard screenshot

What’s Next?