{"id":24756244,"url":"https://github.com/ehsannarmani/firebase-analytics-bot","last_synced_at":"2026-02-17T07:06:33.046Z","repository":{"id":273498870,"uuid":"919918772","full_name":"ehsannarmani/firebase-analytics-bot","owner":"ehsannarmani","description":"📊 A Telegram bot that delivers real-time and historical firebase analytics reports, including daily active users, lifetime users, and growth metrics.","archived":false,"fork":false,"pushed_at":"2025-01-28T07:39:46.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T13:54:22.238Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehsannarmani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-21T08:48:48.000Z","updated_at":"2025-01-28T07:39:49.000Z","dependencies_parsed_at":"2025-01-28T13:50:26.986Z","dependency_job_id":null,"html_url":"https://github.com/ehsannarmani/firebase-analytics-bot","commit_stats":null,"previous_names":["ehsannarmani/firebase-analytics-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsannarmani%2Ffirebase-analytics-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsannarmani%2Ffirebase-analytics-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsannarmani%2Ffirebase-analytics-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsannarmani%2Ffirebase-analytics-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehsannarmani","download_url":"https://codeload.github.com/ehsannarmani/firebase-analytics-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066714,"owners_count":20555431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T13:50:24.071Z","updated_at":"2026-02-17T07:06:28.013Z","avatar_url":"https://github.com/ehsannarmani.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Firebase Analytics Telegram Bot\nThis bot provides real-time and historical analytics reports, including daily active users, lifetime users, and user growth, directly in Telegram.\n\n---\n\n## Setup\n### 1. Configure `.env`\n\n   Create a `.env` file and add the following variables:\n - `PROPERTY_ID`: Available in your Firebase console.\n - `SERVICE_ACCOUNT_PATH`: Path to your Google Analytics service account JSON file.\n - `BOT_TOKEN`: Telegram bot token for integration.\n - `UPDATE_CHANNEL_ID`: Chat ID of the channel or group where the bot will send updates (e.g., last 30 minutes active users every 15 minutes and daily active users every 4 hours).\n - `AUTHORIZED_CHATS`: List of chat IDs authorized to use bot commands (separated by commas).\n\n### 2. Run the Bot\n\nInstall dependencies and start the bot:\n\n```bash\nnpm install\nnpm start\n```\n\n## Commands\n\n- `/daily`: Get a report of active users over the last 7 days.\n- `/new_users`: Get a report of new users over the last 7 days.\n- `/versions`: Get a report of active users over the last 7 days grouped by app version.\n- `/min30`: Get a report of active users in the last 30 minutes.\n- `/users`: Get the total lifetime users count.\n- `/countries`: Get the total lifetime users by country.\n- `/live`: Start a live update of active users in the last 30 minutes (updates every 5 seconds).\n- `/stop`: Stop the live update by replying to the live update message.\n\n## Schedules\nThe bot automatically sends updates to the `UPDATE_CHANNEL_ID` at regular intervals:\n- `Daily Active Users`: Sends the previous day's active user count every 4 hours.\n- `Last 30 Minutes Active Users`: Sends the active user count for the last 30 minutes every 15 minutes.\n\nYou can adjust the intervals in `bot/services/scheduler.js`\n\n## Contributing\nContributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsannarmani%2Ffirebase-analytics-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehsannarmani%2Ffirebase-analytics-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsannarmani%2Ffirebase-analytics-bot/lists"}