Skip to content
Attribution and campaigns

What is a ref parameter in a URL?

2 min read · Updated · By the Reveata team

Short answerA ref parameter is a short query string tag, such as ?ref=producthunt or ?ref=podcast, added to a link to name the source of the visit. It is a lighter alternative to full UTM tags, popular for bios, podcasts, launches and partner links.

A full UTM set is long and hard to read aloud. ?ref= does one job, naming the source, in a few characters: easy to say on a podcast, fit in a bio or print under a QR code.

?ref=, ?via= and ?source=

Link Meaning Reveata channel
?ref=producthunt Source tag; a known value Organic social (Product Hunt)
?ref=podcast-ep12 Source tag; an unknown value Referral, source "podcast-ep12"
?via=anna Partner or affiliate link Affiliate
?source=newsletter Another short source tag, read like ref Depends on the value

Only one of the three is kept per visit, in the order ref, via, source (UTM tags, ?ref and ad click ids).

  • The value is matched against known sources, so ?ref=hn or ?ref=producthunt lands on the same row as visits from that site's referrer.
  • A tagged link names its own source; the browser's referrer is then not used for that visit.
  • Ad click ids and a recognised utm_medium win over ref when both are present.
  • ?ref= values have their own view in the Campaign tab of the Sources panel, and ref is a filter and API dimension.
  • Your outbound links keep their ref, via and source parameters in the Exit link report.

For newsletters, use utm_medium=newsletter rather than a bare ref, so the visit lands in the Newsletter channel. The guide Partner, affiliate and ref links that add up has conventions for partners.

When to use ref instead of UTM tags

  • Use ?ref= for one-off mentions, bios, QR codes, podcasts and links others will paste.
  • Use ?via= for affiliates you pay, so they all land in Affiliate.
  • Use UTM tags when you need medium, campaign or content, for example to compare email versions or match ad spend.

Common mistakes

  • Inconsistent values (hn, hackernews, HN-post) for the same source. Keep a list.
  • Redirects that drop the query string. Test the link in a private window.
  • Using ref on internal links, which replaces the visit's real source.

Frequently asked questions

Is ?ref= a standard like UTM?

It is a widely used convention rather than a standard. Tools that support it read it as a source; others may ignore it.

Does ?ref= help with dark traffic?

Yes. Because the source is in the link, it survives chat apps and email clients that send no referrer. See dark traffic.

Can I combine ?ref= with UTM tags?

You can, but the UTM tags then decide the medium and campaign. Choose one scheme per link to keep reports simple.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?
GlossaryWhat are UTM parameters?UTM parameters are five standard tags, utm_source, utm_medium, utm_campaign, utm_term and utm_content, that you add to the end of a link so analytics tools can record exactly which source, kind of traffic and campaign a visit came from.GlossaryWhat is utm_source?utm_source is the UTM parameter that identifies the specific sender of a visit, such as google, newsletter, linkedin or a partner's name. It answers "who sent this visitor?" and is one of the two essential UTM tags, with utm_medium.GlossaryWhat is referral traffic?Referral traffic is visits that arrive by clicking a link on another website, such as a blog post, a directory, a forum or a partner's page, rather than from a search engine, a social network, an email or an ad.GlossaryWhat is dark traffic?Dark traffic, sometimes called dark social, is visits that came from a real link somewhere, such as a WhatsApp message, a Slack thread, an email or a PDF, but arrived without a referrer or tag, so analytics files them under direct traffic.GlossaryWhat is an assisted conversion?An assisted conversion is a conversion in which a channel or campaign appeared somewhere in the customer's journey before the final touch, helping the sale without receiving last-touch credit for it.GlossaryWhat is an attribution model?An attribution model is the rule an analytics or advertising tool uses to decide which touchpoints in a customer's journey get credit for a conversion or payment, and how much each one gets.