Site Visitor Notification for Telegram
A lightweight WordPress plugin that sends a Telegram message every time a real visitor lands on your site.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/labunets/site-visitor-notification/archive/refs/heads/main.zipA lightweight WordPress plugin that sends a Telegram message every time a real visitor lands on your site.
Features
- Instant Telegram alerts with page URL, referrer, IP, location, and timestamp
- Bot/crawler filter — common User-Agent keywords are skipped automatically
- Throttle — suppress repeat notifications from the same IP (configurable, default 30 min)
- Country filter — optionally restrict notifications to specific countries
- IP whitelist — permanently ignore IPs or CIDR ranges (your office, home, staging server)
- Cloudflare-aware — reads
CF-Connecting-IPbefore falling back to other headers - Zero dependencies — no composer, no npm, no API keys beyond your Telegram bot token
Requirements
- WordPress 5.0+
- PHP 7.4+
Installation
- Clone or download this repository.
- Copy the
site-visitor-notificationfolder towp-content/plugins/. - Activate the plugin via Plugins → Installed Plugins.
- Open Settings → Visitor Notifications and configure your bot.
Telegram Setup
1. Create a bot
Open Telegram, start a chat with @BotFather, send /newbot, and follow the prompts. Copy the token you receive.
2. Get your Chat ID
Send any message to your bot, then open:
https://api.telegram.org/bot<TOKEN>/getUpdates
Find "chat":{"id":...} in the response. That number is your Chat ID (negative for groups/channels).
3. Configure the plugin
Paste the token and chat ID into Settings → Visitor Notifications and save.
Settings
| Setting | Description | Default |
|---|---|---|
| Telegram Bot Token | Token from @BotFather | — |
| Chat ID | Personal or group chat ID | — |
| Throttle (minutes) | Suppress repeat notifications from the same IP | 30 |
| Country Filter | Only notify for visitors from listed countries | Off |
| Countries | Comma-separated country names in English | Ukraine |
| IP Whitelist | One IP or CIDR range per line — silently ignored | — |
IP Whitelist example
203.0.113.5
192.168.1.0/24
10.0.0.0/8
Country filter example
Ukraine, Poland, Germany
Example Notification
🌍 New visitor
📄 Page: https://example.com/about
🔗 From: https://google.com
🌐 IP: 203.0.113.5
📍 Location: Kyiv, Ukraine
🕐 Time: 2026-03-30 14:22 UTC
Privacy
No personal data is stored in the database. The plugin uses short-lived WordPress transients only for throttling (keyed on a hash of the IP). All notification data is sent directly to Telegram.