Connects Payload to the Dub link platform and automatically creates and updates shortlinks when configured collections are published. It adds collections for links, tags and analytics to the admin panel. Requires a Dub API key and Payload 4; an older plugin release targets Payload 3.
A Payload CMS plugin that integrates with Dub to automatically create and manage shortlinks for your content.
Installation
npm i @rubixstudios/payload-dub4
Stars
0
Forks
0
Open Issues
Today
Last Updated
830
Weekly Downloads
v3.1.0
npm Version
120.3 KB
Unpacked Size
2
Dependencies
4+2 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 4 |
| Dec 5, 2026 | 4 |
| Dec 4, 2026 | 4 |
| Dec 3, 2026 | 4 |
| Dec 2, 2026 | 4 |
| Dec 1, 2026 | 4 |
| Nov 30, 2026 | 4 |
| Nov 29, 2026 | 4 |
| Nov 28, 2026 | 4 |
| Nov 27, 2026 | 4 |
| Nov 26, 2026 | 4 |
| Nov 25, 2026 | 4 |
| Nov 24, 2026 | 4 |
| Nov 23, 2026 | 4 |
| Nov 22, 2026 | 4 |
| Nov 21, 2026 | 4 |
| Nov 20, 2026 | 4 |
| Nov 19, 2026 | 4 |
| Nov 18, 2026 | 4 |
| Nov 17, 2026 | 4 |
| Nov 16, 2026 | 4 |
| Nov 15, 2026 | 4 |
| Nov 14, 2026 | 4 |
| Nov 13, 2026 | 4 |
| Nov 12, 2026 | 4 |
| Nov 11, 2026 | 4 |
| Nov 10, 2026 | 4 |
| Nov 9, 2026 | 4 |
| Nov 8, 2026 | 4 |
| Nov 7, 2026 | 4 |
| Nov 6, 2026 | 4 |
| Nov 5, 2026 | 4 |
| Nov 4, 2026 | 4 |
| Nov 3, 2026 | 4 |
| Nov 2, 2026 | 4 |
| Nov 1, 2026 | 4 |
| Oct 31, 2026 | 4 |
| Oct 30, 2026 | 4 |
| Oct 29, 2026 | 4 |
| Oct 28, 2026 | 4 |
| Oct 27, 2026 | 4 |
| Oct 26, 2026 | 4 |
| Oct 25, 2026 | 4 |
| Oct 24, 2026 | 4 |
| Oct 23, 2026 | 4 |
| Oct 22, 2026 | 4 |
| Oct 21, 2026 | 4 |
| Oct 20, 2026 | 4 |
| Oct 19, 2026 | 4 |
| Oct 18, 2026 | 4 |
| Oct 17, 2026 | 3 |
| Oct 16, 2026 | 3 |
| Oct 15, 2026 | 3 |
| Oct 14, 2026 | 3 |
| Oct 13, 2026 | 3 |
| Oct 12, 2026 | 3 |
| Oct 11, 2026 | 3 |
| Oct 10, 2026 | 2 |
| Oct 9, 2026 | 2 |
| Oct 8, 2026 | 2 |
| Oct 7, 2026 | 2 |
| Oct 6, 2026 | 2 |
| Oct 5, 2026 | 2 |
| Oct 4, 2026 | 2 |
| Oct 3, 2026 | 2 |
| Oct 2, 2026 | 2 |
| Oct 1, 2026 | 2 |
| Sep 30, 2026 | 2 |
| Sep 29, 2026 | 2 |
| Sep 28, 2026 | 2 |
| Sep 27, 2026 | 2 |
| Sep 26, 2026 | 2 |
| Sep 25, 2026 | 2 |
| Sep 24, 2026 | 2 |
| Sep 23, 2026 | 2 |
| Sep 22, 2026 | 2 |
| Sep 21, 2026 | 2 |
| Sep 20, 2026 | 2 |
| Sep 19, 2026 | 2 |
| Sep 18, 2026 | 2 |
| Sep 17, 2026 | 2 |
| Sep 16, 2026 | 2 |
| Sep 15, 2026 | 2 |
| Sep 14, 2026 | 2 |
| Sep 13, 2026 | 2 |
| Sep 12, 2026 | 2 |
| Sep 11, 2026 | 2 |
| Sep 10, 2026 | 2 |
| Sep 9, 2026 | 2 |
| Sep 8, 2026 | 2 |
| Sep 7, 2026 | 2 |
830+811 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 830 |
| Dec 5, 2026 | 834 |
| Dec 4, 2026 | 1,038 |
| Dec 3, 2026 | 982 |
| Dec 2, 2026 | 761 |
| Dec 1, 2026 | 758 |
| Nov 30, 2026 | 1,079 |
| Nov 29, 2026 | 994 |
| Nov 28, 2026 | 991 |
| Nov 27, 2026 | 967 |
| Nov 26, 2026 | 944 |
| Nov 25, 2026 | 924 |
| Nov 24, 2026 | 945 |
| Nov 23, 2026 | 770 |
| Nov 22, 2026 | 761 |
| Nov 21, 2026 | 1,074 |
| Nov 20, 2026 | 1,200 |
| Nov 19, 2026 | 935 |
| Nov 18, 2026 | 1,019 |
| Nov 17, 2026 | 990 |
| Nov 16, 2026 | 859 |
| Nov 15, 2026 | 853 |
| Nov 14, 2026 | 560 |
| Nov 13, 2026 | 529 |
| Nov 12, 2026 | 611 |
| Nov 11, 2026 | 682 |
| Nov 10, 2026 | 748 |
| Nov 9, 2026 | 736 |
| Nov 8, 2026 | 732 |
| Nov 7, 2026 | 681 |
| Nov 6, 2026 | 411 |
| Nov 5, 2026 | 339 |
| Nov 4, 2026 | 222 |
| Nov 3, 2026 | 153 |
| Nov 2, 2026 | 145 |
| Nov 1, 2026 | 734 |
| Oct 31, 2026 | 731 |
| Oct 30, 2026 | 717 |
| Oct 29, 2026 | 700 |
| Oct 28, 2026 | 653 |
| Oct 27, 2026 | 805 |
| Oct 26, 2026 | 795 |
| Oct 25, 2026 | 195 |
| Oct 24, 2026 | 207 |
| Oct 23, 2026 | 198 |
| Oct 22, 2026 | 227 |
| Oct 21, 2026 | 277 |
| Oct 20, 2026 | 307 |
| Oct 19, 2026 | 887 |
| Oct 18, 2026 | 883 |
| Oct 17, 2026 | 878 |
| Oct 16, 2026 | 883 |
| Oct 15, 2026 | 855 |
| Oct 14, 2026 | 807 |
| Oct 13, 2026 | 615 |
| Oct 12, 2026 | 27 |
| Oct 11, 2026 | 28 |
| Oct 10, 2026 | 24 |
| Oct 9, 2026 | 23 |
| Oct 8, 2026 | 28 |
| Oct 7, 2026 | 27 |
| Oct 6, 2026 | 19 |
| Oct 5, 2026 | 24 |
| Oct 4, 2026 | 24 |
| Oct 3, 2026 | 24 |
| Oct 2, 2026 | 26 |
| Oct 1, 2026 | 29 |
| Sep 30, 2026 | 36 |
| Sep 29, 2026 | 48 |
| Sep 28, 2026 | 56 |
| Sep 27, 2026 | 228 |
| Sep 26, 2026 | 276 |
| Sep 25, 2026 | 272 |
| Sep 24, 2026 | 267 |
| Sep 23, 2026 | 261 |
| Sep 22, 2026 | 255 |
| Sep 21, 2026 | 292 |
| Sep 20, 2026 | 117 |
| Sep 19, 2026 | 66 |
| Sep 18, 2026 | 65 |
| Sep 17, 2026 | 64 |
| Sep 16, 2026 | 62 |
| Sep 15, 2026 | 58 |
| Sep 14, 2026 | 8 |
| Sep 13, 2026 | 8 |
| Sep 12, 2026 | 9 |
| Sep 11, 2026 | 9 |
| Sep 10, 2026 | 13 |
| Sep 9, 2026 | 17 |
| Sep 8, 2026 | 18 |
| Sep 7, 2026 | 19 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1078131883-root)<a href="https://payloaddirectory.dev/plugins/1078131883-root"><img src="https://payloaddirectory.dev/badge/1078131883-root.svg" alt="Payload Directory"></a>README
A Payload CMS plugin that integrates with Dub to automatically create and manage shortlinks, tags and analytics for your published content.
Dub is an open-source link attribution platform for short links, conversion tracking and affiliate programs.
Create a free Dub account: Dub
| Payload CMS | Plugin version | Release branch | npm dist-tag |
|---|---|---|---|
| v4 | 3.x | main | latest |
| v3 | 1.x | payload-v3 | payload-v3 |
pnpm add @rubixstudios/payload-dub
For Payload CMS v3:
pnpm add @rubixstudios/payload-dub@payload-v3
The following configuration targets the Payload v4 release.
// payload.config.ts
import { buildConfig } from 'payload/config'
import { payloadDub } from '@rubixstudios/payload-dub'
export default buildConfig({
plugins: [
payloadDub({
dubApiKey: process.env.DUB_API_KEY!,
siteUrl: process.env.NEXT_PUBLIC_SITE_URL!,
collections: [
{ docs: 'posts', slugOverride: 'post' },
{ docs: 'insights', slugOverride: 'insight' },
'news',
],
// Optional configuration
baseUrl: process.env.DUB_BASE_URL,
domain: 'mycustomdomain.com',
tenantId: '12345',
isPro: false,
namespace: 'my-app',
onDelete: 'delete',
onUnpublish: 'retain',
autoBackfill: true,
uniqueSources: true,
dubCollection: {
overrides: {
admin: { group: 'Marketing' },
},
},
dubTagCollection: {
overrides: {
admin: { group: 'Marketing' },
},
},
dubAnalytics: {
overrides: {
admin: { group: 'Marketing' },
},
},
}),
],
})
onDelete and onUnpublish with retain or delete to change this behavior.namespace when multiple installations share a Dub workspace. Existing external IDs remain unchanged.Failed link operations are recorded in the generated links collection. Save the published source document again to retry synchronization, or use the authenticated endpoint:
POST /api/dubLinks/{id}/retry
Use the Payload link document ID and the configured links collection slug. The endpoint respects admin authentication and collection access policies. Retries use the stored operation; save the source document again if its content has changed.
Failed direct deletions retain the local record for retry. Payload and Dub transactions are independent, so remote state may require reconciliation after a local transaction failure.
MongoDB automatically backfills missing source keys during initialization without contacting Dub. No configuration changes are required under normal upgrade conditions. Duplicate mappings and conflicting indexes must be resolved before continuing.
Existing SQL installations require a schema migration and source-key backfill before enforcing uniqueness. Temporarily set uniqueSources: false while preparing the migration, resolve duplicates, backfill source keys, then restore uniqueness and verify the database index.
Back up the database and pause writes during upgrades. See BACKFILL.md for additional migration guidance.
This project is licensed under the MIT License - see the LICENSE file for details.
For support or inquiries:
Rubix Studios
https://rubixstudios.com.au
Topics
payload posthog
Native PostHog integration for Payload Admin covering analytics, session replay, error tracking, logs and feature flags
791.7k/wk0v3
payload plugin presets
Save and apply reusable block configurations as presets from the Payload admin blocks drawer
786.7k/wk37v3
payload plugin scheduling
Schedule future publication of drafts on collections and globals with a secured cron endpoint
77783/wk37v3
payload plugin widgets
Dashboard widgets for KPI figures, lists and charts that read from your Payload collections
77536/wk2v3 v4
payload plugin datacircle
Datacircle GTM API benchmark data as Payload endpoints, a selector field and a server-side client
77227/wk0v3
bitrix24
Send Payload form builder submissions to Bitrix24 CRM as leads or deals
76479/wk0v4