Help Center / Tracked links
10 · Tracked links
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.
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.
Three steps, in order:
https://yoursite.com/download/sales-101-worksheet. Your host forwards the request to the measr-link-redirect function.measr_tracked_links table: destination, display name, file type, declared source, and the page the link was posted on.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.
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:
| Column | Meaning |
|---|---|
| Origin page | The public URL recorded on the link. (none) collects downloads that carry no origin, which is every download the snippet records on your own site. |
| Source | The 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. |
| Downloads | Clicks on links posted on that page, in the selected date range. |
| Session Rate | Share 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.
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.
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.measr-link-redirect and measr-link-admin, with --no-verify-jwt./download/* reaches the redirect function. A Netlify example is in the setup guide; the direct function URL works without a rule.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.
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.
| Rule | What it means |
|---|---|
| Slug | Lowercase 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. |
| Destination | An 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. |
| Name | What the dashboard shows. House convention Group · NN · Title, for example Sales 101 · 06 · Retainer Scope. |
| Source | The channel the link is made for, declared once: community, linkedin, email, website, or other. |
| Origin page | Required for community links, optional otherwise. The full public URL of the lesson or post the link goes into. |
| Limit | Sixty 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.