Node.js
Set up your Telemetree Node.js SDK
Installation
Quick Start
-
First, obtain your Telemetree API credentials from your application settings.
Project ID
API Key
-
Initialize the Telemetree client in your bot:
- Set up event tracking in your bot handlers:
Configuration
Create a .env
file with your Telemetree credentials:
Event Tracking
The SDK automatically tracks various Telegram events:
- Messages
- Edited messages
- Commands
- Inline queries
- And more…
Custom Event Tracking
You can also track custom events:
Error Handling
The SDK provides comprehensive error handling:
Response Logging
The SDK provides detailed response logging:
Encryption
The SDK uses RSA encryption to secure event data before sending it to the Telemetree service, ensuring data privacy. The publicKey
is fetched automatically from the Telemetree configuration service during initialization, so there’s no need to manually set it.
Key Features
- Real-Time Analytics: Monitor user activity within your Telegram Mini App in real-time.
- User Retention Metrics: Track returning users and pinpoint which features encourage app retention.
- Web3 data: discover web3 metrics associated with your users.
- Seamless Integration: Our SDKs are lightweight and integrate easily with auto event mapping.
- Telegram-native: Telemetree is built natively for Telegram.
- User segmentation: API for personalized notifications based on cohorts, completed actions. web3 data and more.
- Free tier with wide limits
Resources
Consider visiting our resources for more info about the state of the Telegram Mini Apps ecosystem and Telegram analytics.