Logging 150M+ link clicks: how Dub built webhook event logs
Blog post from Tinybird
Dub is an open-source link management and conversion tracking platform that utilizes Tinybird for its real-time analytics and webhooks feature, celebrated its first anniversary and handles significant data volumes efficiently. The platform's webhook event logs are stored in a Tinybird data source, organized by a sorting key that includes webhook_id and timestamp for efficient filtering and reading. Dub employs the zod-bird client to interact with Tinybird's APIs, using functions like recordWebhookEvent to post JSONL formatted payloads to Tinybird, and getWebhookEvents to fetch and validate data through Tinybird pipes. This data retrieval is facilitated by Tinybird's SQL query pipes, allowing dynamic filtering with parameters like webhookId to ensure fast, relevant data access. The Dub UI displays the event logs to users by retrieving data via an API and mapping it into components for a streamlined visual representation. Dub's integration with Tinybird supports various use cases, enabling users to connect their analytics with broader development tools and create customized workflows.