AGTEAM
92 subscribers
17 links
Open Source • Privacy • Serverless • Automation • Web3

Contact us: @tg_agteam_bot
Download Telegram
Channel created
👋 Welcome to AGTEAM

This is our official channel, where we share what we create.

You won’t find clickbait, endless reposts, or news “just for the sake of news” here. Only content that can truly be useful to developers, project owners, and tech enthusiasts.

What we post:

• 🚀 New AGTEAM projects and releases;
• 🛠 In-depth analyses of feature implementations and interesting solutions;
• 💡 ideas, notes, and insights from real-world development;
• 🌐 Cloudflare Workers, Telegram Bot API, Web, AI, and other technologies;
• 📊 updates on open-source tools and services;
• 🔒 privacy, performance, and modern approaches to development.

Most projects are distributed for free and are created primarily for the benefit of the community.

Thank you for joining us! ❤️

📬 Contact

For any questions, suggestions, bug reports, or collaboration opportunities:

@tg_agteam_bot
🚀 A quick update on what I’m currently working on.

For the past few weeks, almost all my spare time has gone into AG Analytics—my own web analytics system.

I initially wanted to build something simple for my own projects, but the idea gradually grew into a full-fledged platform.

As of now, it features:

• support for multiple sites within a single dashboard;
• detailed statistics on pages, browsers, devices, countries, referrers, and search engines;
• charts and statistics covering various time periods;
• real-time visitor tracking;
• a fully server-side architecture based on Cloudflare Workers, D1, and KV;
• setup in just a few minutes, even if you’ve never worked with Cloudflare before;
• no Docker, VPS, MySQL, PHP, or other complex infrastructure;
• no cookies or fingerprinting—only the data strictly necessary for analytics.

I had to put a lot of work into optimization. For instance, I completely overhauled the real-time visitor counting mechanism so the project runs smoothly even on Cloudflare’s free tier without hitting KV limits.

But this is just the first version.

Future plans include events (Events API), goals and conversions, notifications, public dashboards, plugins for popular CMSs (still undecided) and frameworks, plus a few other interesting ideas.

Right now, I’m actively polishing the project, testing it, fixing minor issues, and getting it ready for its first full release.

If you’re interested in following the development process, stay tuned to the channel. I’ll be sharing updates on changes, the challenges I encounter, and why certain solutions turned out to be far less obvious than they initially seemed.
Why I Chose #Cloudflare Workers

When the idea for AG Analytics first came up, my initial thought wasn't about the code, but rather where the service would actually run.

The most obvious choice is a VPS. That’s what almost everyone does.

But then comes the usual routine:
— renting a server;
— configuring Linux;
— installing Docker;
— managing updates;
— handling backups;
— worrying about security.

I wanted something completely different.

I wanted a user to be able to open the README, run a few commands, and be viewing their site's statistics within 5–10 minutes.

Without any server administration.

That’s why I chose Cloudflare Workers.

Here’s what I like about them:

• no need to set up or maintain a server;
• scaling happens automatically;
• D1 handles the database needs;
• KV is perfect for caching;
• the Cloudflare network operates globally, ensuring minimal latency.

As a result, the entire analytics setup—API, dashboard, database, and tracker—lives within a single ecosystem. No additional services are required.

Of course, this approach has its limitations, too.

During development, I had to completely rethink the architecture a few times. For instance, the mechanism for counting active users initially relied on KV, but it quickly became clear that this was a bad idea for the free tier. I ended up reworking the logic to use D1 instead, which proved to be much more practical.

That is probably what I enjoy most about development.

It’s not just about writing code that works; it’s about finding a solution that remains simple and fast, without forcing the user to deal with a lot of unnecessary complexity.

That is exactly the kind of product I want AG Analytics to be. Minimal setup. Maximum value.
👋 A bit about my background

Since this channel is brand new, I thought I’d share a little about the projects I’m working on.

Most of them started with a simple thought: "It would be handy if a tool like this existed..." So, I ended up building it myself 😄

As of now, these include:

🤖 @CoinLumaBot — a cryptocurrency bot.

📜 @VinCertBot — a tool for checking vehicle VINs.

🌦 @WeaYouBot — a weather bot you can use right inside Telegram.

📊 @FlareStatBot — statistics and analytics for Cloudflare.

❤️ And a few volunteer projects that help people without generating any profit. To me, these are arguably even more valuable than commercial ventures.

And that’s not all.

Right now, my main focus is AG Analytics—a new web analytics system I’ve mentioned before. But from time to time, I’ll also showcase my other projects: the story behind their creation, the problems they solve, the challenges I faced, and the interesting technical solutions I implemented.

I think that’ll be far more engaging than simply posting yet another release note saying "bug fixes."

If even just one story proves useful to someone, then creating this channel was worth it.
📊 AG Analytics — polished things up a bit

I updated the analytics and traced the entire data flow—router → database → frontend—to ensure the new features are working exactly as intended.

Here’s what’s currently in place:

🤖 bot statistics;
📈 comparison with the previous period;
🌍 country flags;
🔗 referrer site favicons via DuckDuckGo;
🎯 UTM campaigns;
🧹 automatic weekly cleanup of old data via Cron.

Most of the functionality was already in the codebase; the goal this time wasn't so much to add new features, but to thoroughly test everything from end to end.

The syntax is clean, imports resolve correctly, and the pipeline works.

Moving on.
😅 When analytics gets in the way of analytics
I ran into a pretty funny issue with AG Analytics.
It turns out that some ad blockers simply see the word "Analytics" and decide: "No thanks."
As a result, some requests never reach the server, and I end up with incomplete statistics. The funny thing is, the code itself works fine—the problem has nothing to do with it.
Now I’m figuring out how to resolve this gracefully without turning the project into a cat-and-mouse game with ad blockers.
It looks like the next challenge for AG Analytics is learning not to look like analytics 😄
🔧 A small update to AG Analytics

While troubleshooting an issue where the analytics script was being blocked, I decided to tweak the tracker's name.
tracker.js has been renamed to widget.js.

The old /tracker.js hasn't gone anywhere—it keeps working, so sites where it’s already installed shouldn't break. However, new installations will now use /widget.js right from the start.

I also updated the snippet generation, the README, and the documentation regarding custom domains (subdomain.domain.com).

In short, there’s no urgent need to migrate existing sites; you can switch them over gradually at your own pace.
It’s a minor change, but these are the kinds of things you have to do when a project moves beyond just "internal testing" 🙂
🧩 Found the culprit behind the broken statistics collection

It looks like I initially headed down the wrong path.

Renaming /collect to /event and tracker.js to widget.js, or setting up a custom domain, didn't solve the issue. It turned out the names had nothing to do with it.

The browser classifies both event and ping requests as ping requests. This happens because navigator.sendBeacon() is used.

Some blockers—including Brave Shields and specific uBlock Origin lists—can block these requests entirely, regardless of the domain or filename.

In the end, I replaced sendBeacon() with a standard:

fetch(..., { keepalive: true })

Now the browser classifies the requests as fetch/XHR rather than ping.

Long story short, the problem wasn't what the analytics were named, but how they sent the data 😅

It also explains why my previous attempts didn't make any difference.
🪙 Now, a bit about CoinLumaBot

One of the projects that has been part of AGTEAM for a long time is @CoinLumaBot.

Its purpose is incredibly simple: to quickly check the current cryptocurrency rate without opening an exchange, a website, or a separate app.

You select the coin you need, and you get the up-to-date price. It supports BTC, ETH, and other cryptocurrencies.

No trading, wallets, or unnecessary features. Just open Telegram → check the rate → carry on with your day.

These are exactly the kind of small tools I enjoy creating: a single, specific task that the bot handles quickly and without any fuss.

👉 @CoinLumaBot — for those times when you just need to know what your crypto is worth right now.
🚀 AG Analytics v0.2.0-beta.1

I’ve rolled out a new release of AG Analytics.

In this version, I added custom events, period comparison, UTM campaign tracking, bot filtering, automatic cleanup of old data, and a few UI tweaks.

I also specifically fixed an issue with ad blockers—I finally got to the bottom of why some statistics were being lost.

The release is available now: ☁️ v0.2.0-beta.1
Please open Telegram to view this post
VIEW IN TELEGRAM
🚀 AG Analytics v0.3.0-beta.1

Just rolled out a new release.

This time, I focused mostly on the interface and usability:
— added separate statistics for bots and crawlers;
— added search functionality for search queries;
— separated the views and unique visitors charts;
— added drag-and-drop block reordering;
— properly optimized the dashboard for mobile devices;
— added a site favicon and a manual refresh button;
— fixed a few minor issues related to data and site deletion.

No database schema changes were made, so you can simply deploy the update over the current version.

☁️ v0.3.0-beta.1
Please open Telegram to view this post
VIEW IN TELEGRAM