-
Notifications
You must be signed in to change notification settings - Fork 42
Update docs for dub partners + guides #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mcsdevv
wants to merge
2
commits into
dubinc:main
Choose a base branch
from
mcsdevv:docs-partners-alignment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,63 @@ | ||
| --- | ||
| title: Data model | ||
| description: "A quick overview of how Dub is structured." | ||
| description: "Understanding the core data models in Dub." | ||
| --- | ||
|
|
||
| Whether you are using Dub's [API](/api-reference/introduction) or not, this page is a quick way to understand how Dub works. | ||
| Understanding the core data models is key to using the Dub API and platform effectively. All data in Dub belongs to a Workspace, which acts as the top-level container for your organization. | ||
|
|
||
| Within Dub, all data belongs to a [**Workspace**](#workspace). Within a workspace, you have: | ||
| This page provides a conceptual overview of the primary entities you'll interact with and how they relate to each other, whether you're using the [Dub dashboard](https://app.dub.co) or the [Dub API](/api-reference/introduction). | ||
|
|
||
| - [Links](#links) | ||
| - [Analytics](#analytics) | ||
| - [Partners](#partners) | ||
| - [Customers](#customers) | ||
| - [Tags](#tags) | ||
| - [Domains](#domains) | ||
| ## Core Entities | ||
|
|
||
| When interacting with Dub's API, you'll also need to create a [workspace API key](/api-reference/tokens) to authenticate your requests. | ||
| The following table defines the primary data models in Dub: | ||
|
|
||
| ## Links | ||
| | Entity | Description | | ||
| | -------------- | ---------------------------------------------------------------------------------------------------------------- | | ||
| | **Workspace** | The top-level container for all your data. Invite team members, manage roles, and configure billing here. | | ||
| | **Program** | A partner program you create with configurable reward rules, commission structures, and enrolled partners. | | ||
| | **Partner** | A user who joined a program. They receive a unique referral link and can earn commissions on conversions. | | ||
| | **Link** | A short link that redirects to a destination URL. Can be standalone or associated with a partner for tracking. | | ||
| | **Analytics** | Aggregated data about link performance including clicks, geographic location, devices, referrers, and UTMs. | | ||
| | **Customer** | An end-user who clicked a partner's link and converted (e.g., signed up or made a purchase). | | ||
| | **Commission** | A record of a successful conversion attributed to a partner, with a status (pending, approved, paid) and amount. | | ||
| | **Domain** | A custom domain for branded short links. Improves brand recognition and click-through rates. | | ||
| | **Tag** | A label to organize, filter, and group links for easier management and analytics segmentation. | | ||
|
|
||
| Links are the bread and butter of Dub. You can shorten any URL to a Dub link, which you can then share with your audience. Links can be [created](/api-reference/endpoint/create-a-link), [updated](/api-reference/endpoint/update-a-link), and [deleted](/api-reference/endpoint/delete-a-link) via the [Dub API](/api-reference/introduction) or the [Dub dashboard](https://app.dub.co). | ||
| ## Entity Relationships | ||
|
|
||
| ## Domains | ||
| The diagram below illustrates how these entities relate to one another: | ||
|
|
||
| On Dub, you can [add custom domains](https://dub.co/help/article/how-to-add-custom-domain) to create branded short links for better brand recognition. You can also [set a primary domain](https://dub.co/help/article/how-to-set-primary-domain) for it to be used as the default domain for new links (both via the API and the dashboard). | ||
| <Frame> | ||
| <img | ||
| className="rounded-lg border border-gray-100" | ||
| src="/images/data-model.png" | ||
| alt="Dub Data Model - Entity Relationship Diagram" | ||
| /> | ||
| </Frame> | ||
|
|
||
| ## Tags | ||
| ## Key Relationships | ||
|
|
||
| Tags are a way to organize your links. You can [add tags to your links](https://dub.co/help/article/how-to-use-tags) to categorize them and make them easier to find. You can also [filter analytics by tags](https://dub.co/blog/introducing-tags#filtering-analytics-by-tags) to get a better understanding of how your campaigns are performing. | ||
| The relationships between entities follow a clear hierarchy: | ||
|
|
||
| ## Workspace | ||
| 1. **Workspace → Program**: A workspace can have multiple partner programs. Each program operates independently with its own reward rules and partners. | ||
|
|
||
| [Workspaces](https://dub.co/help/article/what-is-a-workspace) is the defacto way of organizing your links and working with your team on Dub. You can think of a Dub workspace like a workspace on Slack or Discord – it's a shared space where you can [invite your team members](https://dub.co/help/article/how-to-invite-teammates) to collaborate on links. | ||
| 2. **Program → Partner**: Partners join a specific program. A single user could be a partner in multiple programs across different workspaces. | ||
|
|
||
| 3. **Partner → Link**: When a partner joins a program, they receive a unique referral link. This link is used to track all referrals back to that partner. | ||
|
|
||
| 4. **Link → Customer**: When a visitor clicks a partner's link and converts, they become a Customer. The customer is permanently associated with the referring link. | ||
|
|
||
| 5. **Customer → Commission**: Each qualifying action by a customer (e.g., a purchase) generates a Commission record for the partner who referred them. | ||
|
|
||
| ## Next Steps | ||
|
|
||
| Now that you understand the data model, you can: | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Set up Dub Partners" icon="users" href="/partners/quickstart"> | ||
| Create your first partner program and start tracking referrals | ||
| </Card> | ||
| <Card title="Explore the API" icon="code" href="/api-reference/introduction"> | ||
| Learn how to interact with these entities programmatically | ||
| </Card> | ||
| </CardGroup> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix mobile SDK links to match the mobile SDK paths.
Line 113 links to
\/sdks/client-side/swift`and`/sdks/client-side/react-native`, but the navigation uses the mobile SDK path prefix (e.g.,`/sdks/client-side-mobile/...``). These links will likely 404.🔧 Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents