Community growth
How Discord invite tracking works
How Discord invite tracking works: a bot compares invite use counts before and after a member joins to see which link they used, and credits the inviter.
Discord invite tracking works by comparing each invite link's use count before and after someone joins. The invite whose count went up is the one the new member used, so the bot can credit the person who created it. Discord doesn't announce this directly, so tracking relies on a bot that can read the server's invites.
How does a bot know which invite was used?
Every Discord invite has a use counter. A tracking bot works like this:
- It stores a snapshot of all invites and their use counts.
- A new member joins.
- The bot fetches the invite list again and compares it with the snapshot.
- The invite whose count increased is recorded as the one used.
- The invite's creator gets credit for the join.
This is why the bot needs permission to see the server's invites. In Discord, that is the Manage Server permission. See how Discord permissions work.
Why would you track invites?
- Know what works. Make a separate link for each source, such as a video, a partner server, or a social post, and compare results. This is central to growing a Discord server.
- Reward helpful members. An invite leaderboard recognizes people who bring friends.
- Run invite-based giveaways. Requirements like "invite three people this week" need counts. See giveaway entry requirements.
- Spot suspicious patterns. A link that brings many accounts in minutes deserves a look.
What are the limits of invite tracking?
Tracking is a best-effort comparison, not a perfect record. Be aware of these cases:
- Simultaneous joins. If two people join close together using different links, the bot can mis-attribute one.
- Vanity and special links. Servers with a custom invite URL, or members who arrive through other routes, may not be attributable to a single person.
- Expired or maxed-out invites. When an invite hits its use limit or expires, it disappears and the bot may need to infer what happened.
- Missed history. Tracking starts when it's enabled. Members who joined earlier aren't counted retroactively.
- Missing permission. Without Manage Server, the bot can't read invites at all.
Treat numbers as strong signals rather than courtroom evidence.
What about privacy?
Invite tracking records who invited whom, which is a relationship between accounts. Good practice is to track only counts and the link used, avoid storing message content, tell your members it's happening, and choose who can view the numbers. Staff-only or personal visibility is a reasonable default.
Common mistakes
- One shared link everywhere. You can't tell sources apart. Create separate links.
- Never-expiring links shared publicly. They can be posted on sites you don't control. Use expiry or use limits for sensitive links.
- Rewarding raw invite counts. This can encourage spam-inviting. Combine with a minimum membership requirement.
- Forgetting to resync. After many invites change, refresh the cache so counts stay accurate.
Doing this with Based
Based's Activity tracking module is off by default. It counts messages (message text is never saved) and can optionally record which invite each new member used, which needs the Manage Server permission. Use /invites to see a member's tracked invites, /topinvites for the server's invite leaderboard, and /syncinvites (Manage Server) to refresh the tracked invite cache. A visibility setting controls whether members see only their own stats, staff only, or public leaderboards. Every slash command also works with the "." prefix, for example .topinvites.
Details are in the activity tracking docs.
Frequently asked questions
Can Discord show who invited someone?
Not directly for every join. Server owners can see invite usage in Discord, but per-person attribution generally needs a bot that compares invite counts when someone joins.
What permission does an invite tracker need?
It needs Manage Server so it can read the server's invite list and use counts.
Why is my invite count wrong?
Common causes are simultaneous joins, expired invites, vanity links, or tracking that wasn't on when members joined. Refreshing the invite cache can fix drift.
Does invite tracking read my messages?
It doesn't need to. Invite tracking only compares link use counts, and message-activity counting can be done with counts alone.
Keep learning
- Community growth
How to grow a Discord server
How to grow a Discord server: pick a clear niche, make joining easy, welcome every member, and track invites so you know which channels actually bring people.
- Community growth
Giveaway entry requirements explained
Giveaway entry requirements explained: roles, account age, membership time, message activity, and invites, plus how to pick rules that block alts but stay fair.
- Community growth
Discord activity leaderboards explained
Discord activity leaderboards rank members by messages or invites over a time period. Learn how they work, when they help, and how to keep them fair and private.
- Discord basics
How Discord permissions work
Discord permissions control what members and bots can do. Learn how role permissions combine, what Administrator does and how to fix common issues.
Try it in your server
Based is an AI Discord bot in 300+ servers. Every slash command also works with the "." prefix.