Last update: 2025-05-09T07:54:31.000Z
Content:
---
title: "Send Dub webhooks to Tinybird · Tinybird Docs"
theme-color: "#171612"
description: "In this guide you'll learn how to send data from Dub to Tinybird."
inkeep:version: "forward"
---




# Send Dub webhooks to Tinybird [¶](https://www.tinybird.co/docs/forward/get-data-in/guides/ingest-from-dub#send-dub-webhooks-to-tinybird)

Copy as MD With [Dub](https://dub.co/) , you can shorten any link and get powerful [conversion analytics](https://dub.co/analytics) . By integrating Dub with Tinybird, you can analyze your events and usage data in real time.

Some common use cases for sending Dub webhooks to Tinybird include:

1. Tracking link clicks.
2. Monitoring link performance.
3. Analyzing user engagement patterns.
4. Creating custom dashboards for link performance.
5. Enriching other data sources with real-time link metrics.

Read on to learn how to send data from Dub to Tinybird.

## Before you start [¶](https://www.tinybird.co/docs/forward/get-data-in/guides/ingest-from-dub#before-you-start)

Before you connect Dub to Tinybird, ensure:

- You have a Dub account.
- You have a Tinybird workspace.

## Connect Dub to Tinybird [¶](https://www.tinybird.co/docs/forward/get-data-in/guides/ingest-from-dub#connect-dub-to-tinybird)

1. Open the Dub UI and go to the**  Settings**   >**  Webhooks**   page.
2. Select**  Create Webhook**  .
3. In your Tinybird project, create a data source called `dub`   . You can follow this[  schema](https://github.com/tinybirdco/tinynest/blob/main/tinybird/datasources/dub.datasource)  :

SCHEMA >
  `event_time` DateTime `json:$.tinybirdIngestTime` DEFAULT now(),
  `event_type` String `json:$.event` DEFAULT 'unknown',
  `event` JSON(max_dynamic_types=2, max_dynamic_paths=16) `json:$` DEFAULT '{}'

ENGINE "MergeTree"
ENGINE_PARTITION_KEY "toYYYYMM(event_time)"
ENGINE_SORTING_KEY "event_time" Using the [JSON Data Type](/docs/sql-reference/data-types/json) you can store the semi-structured data you receive from Dub in a single column. You can later retrieve various events and their metadata as needed in your pipes.

The `JSON` data type is in private beta. If you are interested in using this type, contact Tinybird at [support@tinybird.co](mailto:support@tinybird.co) or in the [Community Slack](/docs/community).

1. From Tinybird Cloud, copy a token with privileges to append to the data source you created. You can use the admin token or create one with the required scope.
2. Back in Dub, paste the Events API URL as your webhook URL. Use the query parameter `name`   to match the name of the data source you created in Tinybird. For example:

https://<your_host>/v0/events?name=dub&token=<your user token>

The API host in the following examples must match your Workspace's region. See the full list of [regions and hosts](/docs/api-reference#regions-and-endpoints)

1. Select the checkboxes for the Dub events you want to send to Tinybird, and select**  Create webhook**  .
2. You're done. Dub will now push events to Tinybird via the[  Events API](../events-api)  .


