[Business Automation · Analytics · Backend Product]
TrackLink — Tracking & Marketing Analytics
A system for tracked links and marketing events: campaign links, source identifiers, click and event processing, custom domains and analytics delivered through Telegram tools.
01Project overview
TrackLink answers a practical business question: which sources bring people, and how far do they get. It creates tracked links, processes clicks and events, and turns them into analytics and reports.
It is a separate product from Astra Raven and shows the same backend and interface skills applied to marketing and business automation.
02Engineering challenge
Tracking sits in the critical path of a user’s click. It has to be fast and reliable, and the data it stores must be clean enough to base decisions on.
- A
Redirect quickly while recording the event reliably.
- B
Keep source identifiers consistent across links and domains.
- C
Validate and deduplicate events before they reach analytics.
- D
Present results in a form marketers can actually use.
03Solution architecture
Hover or tap each stage.
Campaign Link
A tracked link with source identifiers, optionally on a custom domain.
04Main components
- 01
Link management
Creating tracked links and managing source identifiers.
- 02
Custom domains
Links served on the customer’s own domains.
- 03
Event processing
Fast click handling and validation of subsequent events.
- 04
Analytics engine
Aggregations by source, conversion stage and period.
- 05
Mini App
Telegram interface for links, analytics and reports.
- 06
Testing
Playwright-based tests and diagnostics for the critical flows.
05Technology stack
Backend
- Python
- aiohttp
- Event tracking
Data
- SQL
- State handling
- Aggregations
Interface & QA
- Telegram Mini App
- Linux deployment
- Playwright
06Interactive demonstration
Campaign analytics
IllustrativeIllustrative Demo — generated sample data. No real clients, campaigns or conversion figures.
Clicks
—
Unique visitors
—
Bot starts
—
Duplicate events filtered
—
Traffic trend · clicks per day
Conversion stages
Sources
| Source | Clicks | Bot starts | Mini App opens | Share |
|---|
07Engineering decisions
- 01
Record first, then redirect fast
The click is captured with minimal work in the request path; heavier processing happens afterwards.
- 02
Events are validated like inputs
Deduplication and validation keep analytics trustworthy.
- 03
Meet users where they are
Analytics are delivered inside Telegram, where the users already work.
08Reliability & testing
- Playwright tests for link creation and redirect flows.
- Deduplication of repeated events.
- Diagnostics for failed or suspicious events.
09Code example
from aiohttp import web
async def track_and_redirect(request: web.Request) -> web.StreamResponse:
slug = request.match_info["slug"]
link = await request.app["links"].get(slug)
if link is None:
raise web.HTTPNotFound()
# Keep the hot path small: enqueue, don't aggregate here.
await request.app["events"].put({
"link_id": link.id,
"source": request.query.get("src", link.default_source),
"kind": "click",
})
raise web.HTTPFound(link.target_url)Illustrative Illustrative Engineering Example — record-then-redirect handler in aiohttp.
Production source is private. Examples here show the engineering approach, not proprietary logic. More in the Engineering Lab.
10Possible extensions
- Webhook integrations for downstream CRM systems.
- Scheduled report delivery.
- Cohort views by source and period.