Getting started
System Requirements
- pip package manager
- Python 3.7+
- A Telegram bot project set up with Python
Installation
Install Telemetree Python SDK using pipInitialization
To being using the Telemetree Python SDK in your application, you’ll need to initialize it with your project’s specific configuration. Initialization is a crucial step that allows the SDK to start capturing and sending analytics data.Step-by-Step Initialization
- Import the Telemetree SDK:
- Initialize the SDK with your project ID and API key.
- Connect the client to your webhook.
TwaAnalyticsProvider
, the SDK will automatically start capturing data based on your configuration.
Event Tracking
Alternatively, you can pass on the Telegram Update dictionary directlyConfiguration
The Telemetree Python SDK provides some configuration options that you can customize:auto_capture_telegram
: Enables or disables automatic capturing of Telegram events (default:True
)auto_capture_telegram_events
: Specifies the types of Telegram events to capture automatically (default:["message"]
)auto_capture_commands
: Specifies the Telegram commands to capture automatically (default:["/start", "/help"]
)
config.py
file in the SDK.