Repository navigation
Telegram bot
The bot sends conversion notifications and a daily digest, and answers commands with statistics. It speaks the same seven languages as the panel.
- In Telegram, open
@BotFather, run/newbotand get a token like1111:AAABBB…. - ⚙ → Integrations → Telegram Bot — paste the token and press Connect.
- On the same page, Connect chat → Get code and send
/start CODEto the bot (or open the "Open bot" link). The code is one-time and valid for 15 minutes. The bot does not accept chats without a code; a chat can be disconnected on the same page. - Enable the notifications you need.
After /start the bot pins a keyboard menu: Stats, Top, Campaigns, Conversions, Notifications, Digest, Language, Help — no need to type the commands.
The panel picks the mode itself and shows it on the status card; you can also set it manually.
-
Webhook — Telegram calls
https://<domain>/telegram_bot.php. Works only over HTTPS, on a domain name, with a certificate Telegram trusts. The request is verified by the Telegram secret token. -
Polling — the
telegram_poll_cron.phpcron fetches updates once a minute. No inbound connection needed: the bot works on a bare IP, overhttp://and behind a proxy. The installer adds the cron:* * * * * php /var/www/orbitra/telegram_poll_cron.php --quiet >> /var/www/orbitra/var/logs/telegram_poll.log 2>&1When a webhook is active, the job exits immediately without doing anything.
If the bot is silent, the status card will show the mode, the error returned by Telegram itself (getWebhookInfo), and the poller's last run time. An empty time in "polling" mode means there is no crontab entry. Manual check:
sudo -u www-data php /var/www/orbitra/telegram_poll_cron.php --once
| Command | What it does |
|---|---|
/stats |
Today's statistics; /stats yesterday, /stats 1d, /stats 7d, /stats 30d
|
/campaigns |
Active campaigns, with a button for each |
/campaign ID |
Campaign details |
/top |
Top 5 campaigns by revenue today |
/conversions |
Last 10 conversions |
/notify on|off |
Conversion notifications; without an argument — current state and a button |
/daily on|off |
Daily digest |
/lang en|ru|uk|es|zh|fr|de |
Bot language; without an argument — choose with buttons |
/sources |
Traffic sources and the status of their URL check |
/checksources |
Check all sources' URLs |
/allow ID |
Allow one more chat by its ID |
/help |
Help and re-pinning the menu |
Commands without an argument change nothing: /notify shows the current state instead of turning notifications off.
- On a conversion — campaign, status, amount and currency, country with a flag, time.
-
Daily digest — clicks, conversions, revenue, cost, profit and the top 3 campaigns. Send time is
telegram_daily_timein the integration settings. The digest is sent by the poller (for webhook mode too), at most once a day.
Вики собирается из папки docs/ репозитория. Правки — через pull request в docs/.
Getting started
Traffic
- Campaigns & streams
- Cloaking
- Landing pages
- Tracking Client (PHP)
- PWA & Web Push
- PWA Funnel
- Content gallery
Conversions & money
Analytics
Infrastructure
Management
For developers