Demo Modules Data Model Compare Pricing FAQ Help Dashboard Get Started

Help Center / Tracked links

10 · Tracked links

Downloads from places your site cannot see.

A tracked link is a short URL on your own domain that stands in front of a file or a page. When someone clicks it, Measr records one download event with the channel and the page the link was posted on, then sends the visitor to the file. It works from a community platform, a newsletter, or a social post, where the tracking snippet never runs. Optional module, off unless you enable it.

Why it exists

The tracking snippet only sees clicks on pages where it runs. A PDF linked from a community lesson, a worksheet in an email, or a template shared on LinkedIn is downloaded without a trace, and the question "which page or channel produces the downloads" stays open.

A tracked link closes that gap. The link lives on your domain, so it looks like yours in every post. The click passes through a small function on your Supabase project, which records the download and forwards the visitor in the same moment. No cookies, nothing stored in the visitor's browser, and the visitor sees only the file.

How a click travels

How a tracked link click travels Short link measr-link-redirect File or page One download event Dashboard yoursite.com/download/… looks up the slug 302 redirect name · type · source · origin page Download origins table visitor clicks 1.5 s budget visitor lands bots skipped Media & Downloads No cookies. Nothing stored in the visitor's browser.
One click, one event, one redirect. The visitor never notices the detour.

Three steps, in order:

  1. The visitor clicks https://yoursite.com/download/sales-101-worksheet. Your host forwards the request to the measr-link-redirect function.
  2. The function looks the slug up in the measr_tracked_links table: destination, display name, file type, declared source, and the page the link was posted on.
  3. It records one download event through the same ingest path the snippet uses and answers with a 302 to the real file or page.

An unknown slug gets a 404 and never lists other links. If the registry does not answer within 1.5 seconds, the visitor gets a 503 with a retry hint rather than a wrong redirect. Known bots receive the redirect and no event, using the same user-agent rules as the snippet.

What the dashboard shows

Every click lands in Media & Downloads next to the downloads the snippet records. The Download breakdown table groups by the link's display name and type, as it always did. New in v1.6.0, the Download origins table groups by the page the link was posted on:

ColumnMeaning
Origin pageThe public URL recorded on the link. (none) collects downloads that carry no origin, which is every download the snippet records on your own site.
SourceThe channel declared when the link was created: community, linkedin, email, website, or other. Where a page holds links with mixed sources, the most frequent one shows.
DownloadsClicks on links posted on that page, in the selected date range.
Session RateShare of all sessions in the range that include one of those clicks.

The table follows the global filters. The origin page is read from each click event, so the numbers stay right even if a link's page is edited later. Rows are not clickable as a filter in this release.

One link per channel. Clicks are not attributed by referrer, because email clients, mobile apps, and most social platforms strip it. The same file posted in a community, on LinkedIn, and in a newsletter gets three links with three sources. That is the whole attribution model, and it is why the source is declared once at creation and never guessed.

Setting it up

Migration 060 ships with v1.6.0 and is applied on every install; it adds the two registry tables and the file bucket and changes nothing until you enable the module. Enabling takes four steps on your Supabase project. The full walkthrough is Step 3c of the setup guide in the repository, and the setup skill offers it as an optional step.

  1. Set the function secrets: MEASR_LINKS_SITE (your site id), MEASR_LINKS_BASE_URL (the public prefix of every short link, for example https://yoursite.com/download), MEASR_LINKS_ALLOWED_HOSTS (the hostnames a link may point to), and MEASR_LINKS_KEY_PEPPER (a secret that hashes admin keys). MEASR_LINKS_COMMUNITY_ORIGIN is optional and pins community links to one platform.
  2. Deploy the two functions, measr-link-redirect and measr-link-admin, with --no-verify-jwt.
  3. Add one redirect rule on your host so /download/* reaches the redirect function. A Netlify example is in the setup guide; the direct function URL works without a rule.
  4. Mint one personal key per admin with node scripts/measr-links-key.mjs --owner <label>. The key starts with mlk_, is shown once, and only ever travels in the X-Links-Key header.

Verify with one link: follow it once with the user agent measr parity check (curl) and expect a redirect and no event; follow it once in a browser and expect one download row for your site.

Creating links day to day

There is no admin screen. Links are created through a small HTTP API, and the repository ships two files for it: docs/tracked-links/SOP.md, written for an AI assistant so it can create, list, edit, and report on links from a chat session, and docs/tracked-links/API.md, the reference with every field and error code. Load the SOP into your assistant, hand it the key in the session, and describe the file and where it will be posted.

RuleWhat it means
SlugLowercase letters, digits, hyphens, 2 to 64 characters. Derived from the name if you do not supply one. Never changes once created, because it is what gets pasted into posts.
DestinationAn uploaded file or an HTTPS URL on one of your allowed hosts. Files up to 25 MiB: pdf, xlsx, xls, md, zip, docx, pptx, png.
NameWhat the dashboard shows. House convention Group · NN · Title, for example Sales 101 · 06 · Retainer Scope.
SourceThe channel the link is made for, declared once: community, linkedin, email, website, or other.
Origin pageRequired for community links, optional otherwise. The full public URL of the lesson or post the link goes into.
LimitSixty new links per admin label per hour.

The assistant proposes the name and the slug, calls the API once per link, and hands back a table with the short link written out in full. Pasting that link into the post is the only manual step.

Editing works through the same API. Re-pointing a link to a new file is the normal way to update a file behind a link, and the post keeps working. Retiring a link sends visitors to your site root and still counts the click, so residual interest stays visible. A slug cannot be changed; a different slug is a new link.

Frequently asked

Does the tracking snippet need to change?
No. The snippet and the ingest function are unchanged in v1.6.0. Tracked links are a server-side module that writes the same download event the snippet writes.
What happens to visitors who click a link while my Supabase project is down?
They get a 503 response with a retry hint after 1.5 seconds instead of a wrong redirect. The function never guesses a destination; the allowed-host list is the only place a link can point.
Can I skip the module?
Yes. Apply migration 060 like every other migration and leave the secrets unset. The tables stay empty, nothing runs, and the Download origins table shows only the (none) row for your site's own downloads.
Why does the (none) row have the most downloads?
Every download the snippet records on your own site carries no origin page, so it lands in that row. Origin pages come only from tracked links, which record the page they were posted on.
Where are the uploaded files stored?
In a public bucket on your own Supabase project named measr-tracked-links, under the link's slug. The public file URL becomes the link's destination.
Previous← Licensing UpHelp Center