Tracking links shared in Slack and Discord: a six-step setup that ignores preview bots
Slack and Discord clicks often carry no source, and preview bots hit your link first. Give each place its own short link and count clicks on your own server.
Muzahid Maruf, FounderUpdated
On this page
Explore with AI
Opens this article inside the chosen assistant with a ready-made prompt.
Tracking links shared in Slack and Discord is a matter of giving each channel or server its own short link on a domain you control, then counting clicks at the redirect.
A click from a chat app often reaches your site with no referring page, and Google Analytics 4 files the visit as Direct.
Slackbot-LinkExpanding 1.0 and Discordbot/2.0 also fetch the URL within moments of the post, so your server log shows a bot request before the first person clicks.
In practice, the method covers links you control: links you post, or links a customer or community manager posts for you. First, name 1 short link per place. Second, flag the 2 preview crawlers.
Third, tie each click to a Stripe payment. The 6 steps below follow the order above in 2026. Step 1 comes first, because counting bot rows overstates clicks by 33% in the sample log below.
Key takeaways
- Google Analytics 4 files a session as Direct when its source is exactly (direct) and its medium is (none) or (not set), which is how an untagged click from a chat app can land.
- Slackbot-LinkExpanding 1.0 and Discordbot/2.0 fetch a link the moment it is posted, and Slack ignores robots.txt and caches for about 30 minutes, so the filter has to live in your own click log.
- One short link per channel, server or workspace carries the source even when the app sends no referrer.
- Flag crawler requests and still redirect them. Then rank links by revenue per 100 clicks once the trial and confirmation time have passed: in the invented example, 86 clicks earn $181.40 per 100 and 1,190 clicks earn $9.83.
- TrackRev is affiliate software with link tracking built in: its Free plan covers 50 links and 1,000 tracked events a month, and revenue per link starts on Indie at $29 a month.
Why do Slack and Discord clicks arrive without a source?
Dark social is the name for visits arriving with no referrer data.
Alexis Madrigal coined the term in an essay published by The Atlantic on October 12, 2012, and traced the gap to email programs, instant messages, some mobile apps and secure-to-non-secure links.
Google Analytics 4 files such visits as direct by rule. Its default channel group defines Direct as a source of exactly (direct) with a medium of (none) or (not set).
Google's direct traffic help adds a warning: redirects and URL shorteners can strip source details. Web clients can drop the referrer too: rel="noreferrer" makes the browser omit the Referer header, MDN says.
Step 2 measures what each Slack and Discord client sends today. In practice, an untagged chat link is therefore a Direct visit by default, per the Google rules above.
For example, 1 untagged link in 1 Slack channel adds 1 visit to Direct, never to Slack. First, tag. Second, measure.
What do preview crawlers do to your click count?
A preview crawler is a bot requesting a link the moment someone posts the link, to draw a preview card. First, the bot fetches the page.
Slackbot-LinkExpanding 1.0 and Discordbot/2.0 both work the same way, so 2 requests reach your server before any reader does. Both bots name themselves in the user agent, which is the field a bot filter reads.
| Crawler | User agent | What it does | Source |
|---|---|---|---|
| Slackbot-LinkExpanding | Slackbot-LinkExpanding 1.0 | Reads oEmbed, Twitter Card and Open Graph tags with HTTP Range headers, then fetches any image, video or audio file those tags name | Slack Robots page |
| Slack-ImgProxy | Slack-ImgProxy 0.19 | Fetches and caches images posted to channels | Same page |
| Slackbot | Slackbot 1.0 | Makes every other HTTP request Slack needs, such as API calls and outgoing webhooks | Same page |
| Discordbot | Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com) | Visits a link when it is shared in a message to build the preview card, and does no continuous crawling | Discord Support |
| Rule | Threshold | Source |
|---|---|---|
| Slackbot-LinkExpanding responses are cached across the service | Around 30 minutes, at most 1 request per URL | Slack Robots page |
| No preview expands for a link already shared in the same conversation | Within 1 hour | Slack Help Center |
| No preview expands in a message with | More than 5 links | Same page |
Slack preview rules that shape what reaches your log.
Slack ignores robots.txt, saying the bot acts for a human and does not follow links like a crawler.
The cache is service-wide, so one link posted in 3 workspaces within half an hour can produce a single Slackbot request, and no log can assign the request to a workspace.
Discord's help article, updated October 3, 2026, says to match the word Discordbot anywhere in the string. For example, the illustrative log below holds 8 rows for 6 visits, and 2 of the 8 rows come from Slackbot and Discordbot.
Counting every row overstates clicks by 33%. Step 3 removes the 2 bot rows.
| Time (UTC) | Link | User agent | Counted |
|---|---|---|---|
| 14:02:09 | sl-tools | Slackbot-LinkExpanding 1.0 | No |
| 14:02:11 | dc-launches | Discordbot/2.0 | No |
| 14:03:40 | dc-launches | iPhone 15, Safari 17.5 | Yes |
| 14:05:27 | sl-tools | Windows 11, Chrome 130 | Yes |
| 14:09:12 | dc-launches | Windows 10, Firefox 131 | Yes |
| 14:21:58 | sl-tools | MacBook Air, Safari 17.4 | Yes |
| 14:48:30 | dc-launches | Pixel 8, Chrome 130 | Yes |
| 15:02:44 | sl-tools | iPad Air, Safari 17.5 | Yes |
Illustrative example log (invented, not real traffic) for 2 links over about an hour. Counting every row reports 8 clicks for 6 visits, 33% too many.
How does tracking links shared in Slack and Discord work?
Six steps close the gaps above. The examples follow example.com/pricing, posted in 1 Discord server, 2 Slack workspaces and a set of founder DMs, on a $39 monthly plan.
Step 1: Why give every place its own short link?
A dedicated short link is the only source label that survives a missing referrer, because Google Analytics 4 cannot name a place the app never reports.
First, create 1 link per place, each pointing at the same destination, and name the link after the place, for example Discord #launches, Community Slack #tools or Acme customer Slack.
In TrackRev's New campaign form, pick "A link per channel" and add a custom short link.
The channel picker offers 9 channels and neither Slack nor Discord is one, but bulk CSV import (up to 500 rows) and the REST API accept both.
A slack or discord row stamps utm_source and utm_medium=social on the destination unless the destination already has tags. The 3 CSV rows below create 3 links on the Free plan, which costs $0 and allows 50 links.
Import the file, paste each short link into its place, and read the report after the first click in 2026.
url,name,channel,utm_campaign,utm_term,utm_content,tags
https://example.com/pricing,Discord #launches,discord,oct-launch,,launches,community
https://example.com/pricing,Community Slack #tools,slack,oct-launch,,tools,community
https://example.com/pricing,Acme customer Slack,slack,oct-launch,,acme,customerWhich link settings fit Slack and Discord?
A Smart Link is a TrackRev link that guesses the channel from the referrer, and a Smart Link is the wrong choice for Slack and Discord.
Slack proxies or strips the referrer, so TrackRev has no Slack mapping and Slack clicks land in Other or Direct. Discord is on the recognized list, but only a click carrying a discord.com referrer gets the label.
First, put the step 1 links on your own domain with 1 CNAME record (custom tracking domains).
If you tag destination URLs by hand, the free UTM builder writes the tags, and medium social lands in Organic Social per Google's channel rules.
A redirect that forgets to forward the query string drops the tags, and the 5-step stripped-UTM test finds the hop responsible.
For example, a link with utm_source=slack and utm_medium=social should show Slack in Google Analytics 4 as Organic Social in 2026. The test takes 1 click.
Step 2: What does a test post in each app show?
A test post is the cheapest way to learn what each client really sends, and the test costs 6 posts and $0. Post a fresh link in a private channel or test server on desktop, web and phone.
That is 6 test posts across 2 apps. Use a new link per test because of the 1-hour rule from Slack's help article, and 1 link per message because Slack expands none in a message with more than 5.
Click each link from each client and read the report. In practice, a client that sends no referrer costs you nothing, because the link's name carries the source.
The preview fetch appears before the human click, with a Slackbot or Discordbot user agent and is_bot set to true. Second, compare the 2 rows. Step 2 ends when you hold 6 results, 1 referrer reading per client.
Step 3: Why flag preview fetches and still redirect them?
Flagging means matching a crawler on a user-agent substring (Slackbot, Discordbot), marking the request as a bot, storing the row and leaving the row out of the counts.
First, blocking is the wrong move, because a refused fetch leaves the post bare. The bot filtering guide covers prefetch headers and empty user agents.
Second, TrackRev does the flagging at the redirect with the isbot 5 user-agent list, which matches all 4 crawlers in the first table, plus empty user agents and prefetch headers.
A flagged request is still redirected and stored with is_bot set, and the link page, attribution and partner reports leave the row out. The 8-row log drops to 6 counted visits, a 25% cut from the raw total.
Per Discord Support, Discordbot visits a link once when the message is shared, so the filter removes 1 row per post in 2026.
Step 4: How does a click reach the signup and the payment?
A click becomes revenue when the visitor ID reaches the payment.
TrackRev's first-party pixel reads the ID on the first pageview, an email address binds the visitor to the customer at signup or checkout, and Stripe is read with a restricted key every 1 hour, or via Stripe webhook for updates within seconds.
Built by hand, the shape is the same, and the table lists each hop. The Payment Links walkthrough has the setup. In practice, two gaps stay open.
First, a click in the phone app followed by a laptop visit to your address arrives as Direct. Second, a signup email differing from the payment email can slip past the join.
Limits come from Stripe Docs: client_reference_id allows 200 characters and metadata allows 50 pairs. Step 4 ends when 1 test payment shows the visitor ID in the Stripe Dashboard.
| Hop | Field | Limit |
|---|---|---|
| Redirect response | vid cookie, plus a _vid URL parameter in TrackRev | 1 year for the cookie |
| Stripe Payment Link | client_reference_id, returned in checkout.session.completed | 200 characters |
| Stripe objects with metadata | Metadata key-value pairs | 50 pairs, keys to 40 characters, values to 500 |
Step 5: How do you rank links by revenue per 100 clicks?
Revenue per 100 clicks is a ranking figure letting places of different sizes compare fairly, because raw clicks reward the biggest audience.
For example, in the invented table below, Discord #launches brings 53.7% of the 2,218 clicks and 21.4% of the $546 MRR. The founder DMs bring 3.9% of the clicks and 28.6% of the MRR.
Acme converts 6 of 11 signups to paid (54.5%) against 3 of 14 for Discord (21.4%).
Four paying customers from 86 clicks is too small a sample to repeat on purpose, so test the lead with a second batch of DMs.
The loudest channel is rarely the most valuable one, and the ranking makes the gap visible.
Finally, sorting by MRR per 100 clicks puts the founder DMs first at $181.40 and Discord last at $9.83, the reverse of the click order in 2026.
| Link | Counted clicks | Signups | Paid | Signups per 100 clicks | MRR | MRR per 100 clicks |
|---|---|---|---|---|---|---|
| Discord #launches | 1,190 | 14 | 3 | 1.18 | $117 | $9.83 |
| Community Slack #tools | 640 | 9 | 1 | 1.41 | $39 | $6.09 |
| Acme customer Slack | 302 | 11 | 6 | 3.64 | $234 | $77.48 |
| Founder DM shares | 86 | 6 | 4 | 6.98 | $156 | $181.40 |
Invented numbers on a $39 monthly plan. The Discord link has the most clicks and the founder DMs have the highest revenue per 100 clicks.
Step 6: When is a link ready to be judged?
A link's revenue arrives after the click by the length of your trial plus the payment's confirmation time. Some payment methods, such as SEPA Direct Debit, confirm later still.
For a 14-day trial and a click on October 1, the first card charge lands on October 15, and a 30-day trial moves the charge to October 31.
The earliest fair comparison falls some days after the charge, once Stripe reports the debit as paid.
Judging a link at day 7 ranks every trial-based link at $0, so the ranking from step 5 means nothing until the longest trial has ended. Wait for the longest trial plus the slowest payment method, then rank the links.
Finally, repeat the ranking monthly, because a place weak in week 1 may have a slow buyer. In practice, a 30-day trial delays the same revenue by 16 days, a 114% longer wait than the 14-day trial in 2026.
| Event | Date | Days after click |
|---|---|---|
| Click | October 1 | 0 |
| Trial ends, first card charge in Stripe | October 15 | 14 |
| Alternative: a 30-day trial ends, first card charge | October 31 | 30 |
| Earliest fair comparison | Some days after October 15, once Stripe reports the debit as paid | 15 or more |
What can these links not tell you?
A redirect log is a record of a device, a place and a time, and a name appears only when the visitor later signs up.
First, a Slack link copied into a DM keeps crediting its original place, and a teammate who types your domain without the link sends Direct traffic.
Second, a redirect also cannot show which member clicked, because Slack and Discord pass no member identity, and a click is not a join when the link points at a Discord invite.
A signup field asking how people heard about you catches the cases above. The post on self-reported versus tracked attribution covers weighing the 2. In practice, treat the redirect log as the floor and the signup answer as a cross-check.
For example, a signup answer of Discord beside a log row of Direct points to a copied link. Compare both columns each month in 2026.
What does TrackRev do here, and when don't you need it?
TrackRev is SaaS affiliate software with link tracking built in.
TrackRev logs each click on the server with time, country, city, device, browser, operating system and referrer, adds the link's saved UTM tags to the destination, and joins clicks to payments from Stripe, Paddle Billing, Polar, Lemon Squeezy, Creem and Dodo Payments.
In practice, revenue per link (step 5) needs a paid plan (pricing).
If you only need to know whether Slack sends sessions, a UTM link and Google Analytics 4 are free and enough, and any shortener with bot filtering covers plain click counts. The UTM parameters guide explains the tags.
The Links and Analytics page lists what a link records. Per the plan table, Free covers 50 links and 1,000 tracked events a month for $0, Indie costs $29 a month, and Growth costs $299 a year.
Try the Free plan on a test link first, and upgrade only when you need revenue per link. The same click log feeds the link page, attribution and partner reports.
| Plan | Price | Links | Tracked events | Revenue per link |
|---|---|---|---|---|
| Free | $0 | 50 | 1,000 a month | Hidden |
| Indie | $29 a month | Unlimited | Unlimited | Shown |
| Growth | $299 a year | Unlimited | Unlimited | Shown |
TrackRev plans for link tracking, October 2026.
Found this useful? Share it.
Frequently asked questions
- A click from a chat app often carries neither a referrer nor UTM tags. Add the 3 core tags (utm_source, utm_medium and utm_campaign) to the destination, or share a short link that adds them.
- No. A redirect records device, browser, location, time and referrer, and no member name. A name appears only after the visitor signs up or pays.
- Flag requests whose user agent contains Slackbot or Discordbot, count only the rest, and keep redirecting the flagged ones. A robots.txt Disallow rule will not help, because Slack says it ignores that file.
- Yes, when the link is yours. The count happens when someone requests your short link, so you need no access to the workspace.
- Share a short link that redirects to the invite URL. You count clicks, and a click is not a join. Discord's invite settings control how long an invite lasts and how many times it can be used.
- A tagged URL is enough for Google Analytics 4 sessions by source when the whole URL stays intact. A short link adds a server-side click log, a bot flag and, with a payment connection, revenue per link.

Written by
Founder, TrackRev.io & Contant.io
Muzahid Maruf founded TrackRev.io, SaaS affiliate software with no limit on tracked revenue, and Contant.io. He writes about affiliate programs.
Writes about Marketing attribution · Link tracking · Revenue analytics · SaaS growth
Run your affiliate program without a revenue cap.
Affiliate software for indie hackers and small SaaS teams: $29 a month flat, 0% fees, link tracking and revenue attribution built in. Free to start, no card.