How We Used Tinybird to Build Our Real-Time Analytics Dashboard
In today’s digital age, the ability to analyze data in real-time is essential for optimizing marketing strategies and engaging audiences effectively.


At CodeQR.io, we implemented a robust solution to monitor link clicks and QR code scans in real-time, leveraging Tinybird as the ideal platform to meet our needs.
Why We Chose Tinybird
Real-time analytics provides a strategic advantage, enabling businesses to make informed decisions quickly. However, building a real-time infrastructure can be complex and costly. We needed a scalable and flexible platform to build event pipelines that aggregated data from multiple sources. Tinybird emerged as the perfect solution.
What is Tinybird?
Tinybird is a real-time data platform that simplifies the ingestion of streaming data and allows the publication of real-time APIs for quick consumption.
Our Criteria for Choosing Tinybird
- High-Frequency Data Ingestion
Tinybird supports high-frequency data ingestion from various sources, including Kafka and SaaS, ensuring that our analytics remain up to date. - Real-Time Data Processing and Transformation
Using its intuitive interface, we created transformations to filter, aggregate, and enrich data as it was ingested. - Low-Latency and High-Concurrency APIs
The platform enables us to publish SQL queries as low-latency REST APIs, complete with authentication, OpenAPI documentation, and integrated monitoring dashboards for API performance.
How We Built Our Real-Time Analytics Dashboard
Our implementation followed several key steps:
1. Configuring Data Ingestion
We used Tinybird’s Events API to capture link click and QR code scan data. This scalable API supports up to 1,000 requests per second, ensuring reliability.
import { pipe } from 'tinybird' // Define ingestion schema const schema = { name: 'codeqr_click_events_pipe', fields: [ { name: 'timestamp', type: 'datetime' }, { name: 'link_id', type: 'string' }, { name: 'user_agent', type: 'string' }, { name: 'country', type: 'string' }, { name: 'city', type: 'string' }, { name: 'referrer', type: 'string' }, { name: 'device', type: 'string' }, { name: 'browser', type: 'string' }, ], } // Configure events API pipe .create(schema) .then((response) => console.log('Events API configured', response)) .catch((error) => console.error('Error configuring Events API', error))
2. Data Transformation and Processing
We built Pipes in Tinybird to process SQL queries across multiple stages. This streamlined development and helped us monitor the impact of each query on performance.
-- Define a Pipe for device analysis SELECT device, COUNT(*) as total_clicks FROM codeqr_click_events_pipe GROUP BY device;
3. Publishing APIs
The SQL queries are published as REST APIs directly in Tinybird, allowing our analytics dashboard to consume the data in real-time.
For example, the /api/devices.json endpoint returns aggregated data about the devices used for clicks.
Benefits Achieved with Tinybird
- Faster, More Informed Decisions
Real-time analytics enables us to adjust marketing strategies almost instantly. - Improved User Experience
Up-to-date data allows us to deliver personalized and relevant experiences, increasing engagement and satisfaction. - Operational Efficiency
Tinybird’s unified platform reduces costs and complexities, allowing our team to focus on developing new features.
Conclusion
Tinybird has transformed the way we analyze and respond to real-time data at CodeQR.io, enabling our team to capture, process, and publish data rapidly. This has optimized our operations and continuously improved the user experience.
If you’re looking for a robust solution for real-time data analytics, we highly recommend Tinybird.
This content is perfect for a blog post or technical documentation. If you need adjustments or have questions, feel free to reach out!