How to pass query parameters in short links?

Learn more about how Dub supports query parameter passing from your short links to their destination URLs.

Steven Tey

Written by Steven Tey

Query parameters such as UTM parameters are a fantastic way to understand how your marketing links are performing. Whether it is to understand which social media channels are driving the most traffic, or to understand which campaigns are the most effective, query parameters are a great way to do just that.

With Dub, you can add UTM parameters using our UTM builder before shortening them. This gives you the best of both worlds – the benefits of using UTMs but still have a short, brandable, and easily shareable links.

But what about after you have shortened your links? For that, you can leverage our parameter passing feature.

How does parameter passing work?

With parameter passing, you can attach UTM parameters – or any other query parameter – to your short link and they're passed on to the destination URL.

For example, you can pass a utm_source parameter with the value website to a short link like d.to/passthrough and they're passed on to the destination URL.

Short linkDestination URL
d.to/passthroughdub.co/changelog/pass-url-parameters?ref=dub
d.to/passthrough?utm_source=websitedub.co/changelog/pass-url-parameters?ref=dub.co&utm_source=website

If there are any duplicate parameters, the parameter in the short link will override its counterpart in the destination URL:

Short linkDestination URL
d.to/passthroughdub.co/changelog/pass-url-parameters?ref=dub
d.to/passthrough?ref=dub.codub.co/changelog/pass-url-parameters?ref=dub.co

This is particularly helpful when you're posting the same short link across multiple social media channels and want to quickly customize the UTM parameters for each channel without having to create a new short link for each one.

How much does parameter passing cost?

Other link management platforms like Bitly restrict the parameter passing feature to their Enterprise tier.

On Dub, however, parameter passing is built into every single Dub link. This means you can use parameter passing even on the free plan.

Did this answer your question?