Dub Conversions is a powerful tool that lets you to turn any short link you create on Dub into a full attribution engine. This allows you to understand how well your links are translating to actual users and revenue dollars.
This example app demonstrates the end-to-end flow of how conversion tracking works on Dub – from a user clicking on a conversion-enabled link, to signing up for an account, and making a purchase via Stripe.
Tip
This example uses Option 3 (Stripe Customers) in the Stripe integration guide.
If you're using Stripe payment links or Stripe checkout.session.create, check out the other examples in the Stripe integration guide:
- Navigate to the Stripe integration page in your Dub workspace.
- Click on the "Enable" button to enable the Stripe integration, which will redirect you to the Stripe App installation flow.
- Select the Stripe account to install the app on, and select "Install App".
- Once this is done, you will be redirected back to your Dub workspace and you should see that the integration is now installed.
- In the Stripe account that you installed the Dub Conversions app, create a product in test mode.
- Copy the price ID for the product – you'll need it in Step 5.
- Create a Workspace API key in your Stripe dashboard.
- Copy the value of the API key that's generated – you'll need it in Step 5.
In this step, we will go through the end-to-end journey of a customer clicking on a referral link, signing up, and making a purchase.
- Create a short link on your Dub dashboard with https://conversions.dub.sh as the destination URL and Conversion Tracking enabled.
- When you click on this link it'll bring you to the conversion demo app. You'll notice that there is a
?dclidquery parameter in the browser URL bar, and that it is also stored as a first-party cookie as well. - In the demo app, under "Set up your configuration", enter the values that you got from previous steps:
- DUB_API_KEY: the Dub API key value from step 4
- STRIPE_SECRET_KEY: your Stripe test mode secret key (https://dashboard.stripe.com/test/apikeys)
- STRIPE_PUBLISHABLE_KEY: your Stripe test mode publishable key (https://dashboard.stripe.com/test/apikeys)
- STRIPE_PRICE_ID: the Stripe price ID from step 3
- Under "Login & checkout", enter dummy values for Name, email, and password. All these values (along with the config values) will be stored in cookies for simplicity.
- Click "Signup" and you will be redirected to the Stripe checkout flow with the test mode Stripe product you configured earlier.
- Complete the checkout flow, and you will be redirected back to the Conversion demo app
- Navigate to your Dub Analytics dashboard to view your conversion results.
- You should also be able to see the real-time events stream on the Events dashboard.





