Learn how to associate links with users, campaigns, teams, and other entities within your system.
Method | Type | Description | Use case |
---|---|---|---|
External ID | One-to-one | A unique identifier for a link within your system. | Associating referral links with users in your system. |
Tenant ID | One-to-many | The ID of the tenant that created the link. | Grouping all links created by a user/team in your system. |
Tags | Many-to-many | Grouping links by tags | Organizing links by campaign / user / various for flexible, multi-dimensional filtering and reporting |
externalId
field serves this purpose effectively. It acts as a unique identifier within your database, allowing you to associate it with a corresponding link in Dub’s system.
Dub allows you to create links using an externalId
and subsequently retrieve them by the same identifier.
externalId
should be a unique value across your workspace. Trying to create
a link with an externalId that already exists will result in a 409
conflict
error error.externalId
:
externalId
:
linkId
, you can also update a link by its externalId
.
externalId
with ext_
. For example, if your
externalId
is 12345
, you should pass ext_12345
.externalId
. This is helpful for fetching the analytics for a given link using the unique identifier from your system.
tenantId
prop. This is helpful for fetching the analytics for all the links under a specific tenant, or the total analytics for a tenant.
tagIds
prop. This is helpful for fetching the analytics for all the links under a specific tag, or the total analytics for a tag (or multiple tags).