Skip to content
Denne side findes på dansk. Læs på dansk
HeyMySocial

Tracked links and the click reference

What a tracked link records, which campaign parameters it adds, how the signed hms_ref reference ties a lead to a click, and which clicks are not counted.

A tracked link is a short address you put in a post, an ad or an email instead of the plain address of your page. It counts the click, then forwards the visitor to your page with campaign parameters and a signed reference to that click. It sets no cookie and stores nothing about the visitor: no address, no browser details.

Open Funnels, the tab Tracked links, and press Create tracked link. It needs the right to draft.

Field What it is
Destination The page on your own site the link opens: a full address starting with https:// or http://, at most 2,000 characters
Name How the link appears in reports. Optional; without one the code is shown
Where it will be used The channel: organic_social, paid_social, email, referral or other
Campaign, Content item What the link belongs to. A link tied to a content item takes that item's campaign when you choose none
Campaign parameters (UTM) utm_source, utm_medium, utm_campaign, utm_content, utm_term. Leave them empty for the defaults below

An assistant creates one with create_tracking_link and finds existing ones with list_tracking_links. Creating a link publishes nothing.

A destination that contains an email address is refused, and so is one with a user name or password in it. Personal data must never be put in a link.

What happens on a click

The short address has the form:

https://heymysocial.com/t/k3f9x2ab
  1. The click is recorded as a touchpoint with the link's channel, campaign, content item and campaign parameters, and the link's click count goes up by one.
  2. A link_click event is written to the event log.
  3. The visitor is forwarded with a 302 to the destination. The link's campaign parameters are added, and so is hms_ref, a signed reference to this click:
https://www.example.com/offer?utm_source=instagram&utm_medium=social&utm_campaign=spring-offer&hms_ref=01jc3v9k2q7x8y5z4w6t0r1s2p.9f2c4e6a8b0d1f3a

Parameters the destination already had are kept. Where the link sets a parameter of the same name, the link's value wins. A #fragment on the destination is kept too. The redirect is never cached and is marked noindex.

Campaign parameters

Parameter When you leave it empty Longest value
utm_source Not added 100 characters
utm_medium paid_social for paid social, social for organic social, otherwise the channel's own name 100 characters
utm_campaign The campaign's opaque reference code, when the link has a campaign 150 characters
utm_content Not added. Use it to tell variants apart 150 characters
utm_term Not added 150 characters

A parameter cannot contain a space or an @.

A visit that arrives with campaign parameters but without a tracked link is sorted into a channel by its utm_medium:

Channel utm_medium values
paid_social paid, paid_social, paidsocial, paid-social, cpc, ppc, ads
organic_social social, organic, organic_social, organic-social
email email, e-mail, newsletter
referral referral, partner
other Any other value
unknown No utm_medium at all

Clicks that are not counted

A click is forwarded but not counted, and gets no hms_ref, when:

  • the request comes from an automated reader: a user agent that names a bot, crawler, spider, link preview, monitor, scanner or headless browser;
  • a browser fetches the link ahead of time (Purpose: prefetch);
  • the link is archived, or the workspace is not active.

What is counted is clicks, not people. One person who clicks twice is two clicks.

The click reference

hms_ref is the id of the click's touchpoint, a dot, and a signature. It names a click, not a person, and carries no personal data. A reference that has been altered is ignored; the lead that carried it is still created.

A lead is tied to the click when the reference comes back with it. There are four ways for that to happen:

  • The site script. Where consent allows it, the script reads hms_ref from the address bar and sends it with the page view. The click then belongs to the visitor's session, and a lead from that session is tied to it, also when the form is on a later page.
  • A hosted landing page. A landing page puts the reference in a hidden field of its form.
  • Your own form and server. Keep the reference in a hidden field and send it as properties.hms_ref on the lead_created event. The reference is only in the address of the page the visitor landed on, so pick it up there:
<input type="hidden" name="hms_ref" id="hms_ref">
<script>
  document.getElementById('hms_ref').value =
    new URLSearchParams(location.search).get('hms_ref') || '';
</script>
  • Naming the link. When there was no click to measure, for example a lead who phoned and said where they saw you, send the link's code as properties.tracking_link:
{
  "event_id": "call-2026-0412-01",
  "type": "lead_created",
  "occurred_at": "2026-04-12T09:30:00+02:00",
  "consent_state": "not_applicable",
  "properties": {
    "contact": { "name": "Test Person", "phone": "+45 55 55 01 00" },
    "tracking_link": "k3f9x2ab"
  }
}

A link named this way is recorded as stated by the sender, and the lead's attribution says so: it is not shown as a measured click. See events from your server for how to send either event.

A lead whose consent_state is denied is tied to nothing, whatever it carries. See consent modes.

The short address never changes, so posts that already carry it keep working.

  • Archive on the Tracked links tab takes a link out of the list. An archived link still forwards visitors and stops counting clicks. Show archived links and Restore bring it back.
  • The name, the destination and the campaign parameters are changed with manage_tracking_links, action update. A changed destination changes where real visitors land from that moment.

Limits

Tracked links answer at most 600 requests a minute for one link from one sender address.

A workspace becomes read-only when the plan allows fewer workspaces than the organization has. Its existing links keep forwarding and counting, and creating or changing a link there is refused with quota_exceeded. See plan limits.