How to Build an Affiliate System for Your MU Online Server Website
Implement an affiliate program for your MU Online server website: referral link generation, cookie tracking, commissions in Zen or Coins, an affiliate dashboard, and anti-fraud rules.
A well-structured affiliate program turns engaged players and streamers into a free sales force for your MU Online server. Instead of relying only on paid ads, you give every player a unique link, track who they bring in, and pay a commission on the recharges generated by those referrals. Done caref
A well-structured affiliate program turns engaged players and streamers into a free sales force for your MU Online server. Instead of relying only on paid ads, you give every player a unique link, track who they bring in, and pay a commission on the recharges generated by those referrals. Done carefully — especially on the anti-fraud side — this system can become your main channel for acquiring new players. This tutorial covers everything from the data model to the affiliate dashboard and abuse-protection rules.
What it is and why it's worth it
An affiliate system for a MU Online website connects three pieces: a referral link unique to each player, tracking of who clicked and signed up through that link, and a commission rule paid out when the referred player recharges. Unlike banners and ads, the acquisition cost only exists when there's a real conversion (a recharge), which makes the marketing essentially self-funding. Servers with a solid Discord and YouTube base tend to get the best results, since affiliates already have their own audience.
Data model
The minimal structure involves three tables related to the panel's existing user account:
CREATE TABLE affiliates (
id INT PRIMARY KEY AUTO_INCREMENT,
account_id INT NOT NULL,
ref_code VARCHAR(12) UNIQUE NOT NULL,
commission_rate DECIMAL(4,2) DEFAULT 10.00,
total_earned DECIMAL(10,2) DEFAULT 0,
balance DECIMAL(10,2) DEFAULT 0,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE affiliate_referrals (
id INT PRIMARY KEY AUTO_INCREMENT,
affiliate_id INT NOT NULL,
referred_account_id INT NOT NULL,
clicked_at DATETIME,
registered_at DATETIME,
ip_hash VARCHAR(64)
);
CREATE TABLE affiliate_commissions (
id INT PRIMARY KEY AUTO_INCREMENT,
affiliate_id INT NOT NULL,
referred_account_id INT NOT NULL,
payment_id INT NOT NULL,
amount DECIMAL(10,2),
status ENUM('pending','approved','paid') DEFAULT 'pending',
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
The ref_code is the short identifier used in the URL (yoursite.com/?ref=ABC123). The ip_hash stores a hash of the signup IP, useful for the anti-fraud checks covered later — never store the raw IP in plain text for privacy reasons.
Link generation and the tracking cookie
When a visitor accesses ?ref=ABC123, the site should set a long-lived cookie (30 to 60 days) with that code, even if the visitor doesn't sign up right away. At signup, the backend reads the cookie and writes the row to affiliate_referrals. A typical PHP snippet:
if (isset($_GET['ref'])) {
$ref = preg_replace('/[^A-Za-z0-9]/', '', $_GET['ref']);
setcookie('mu_ref', $ref, time() + 60*60*24*45, '/');
}
// During signup processing:
if (isset($_COOKIE['mu_ref'])) {
$affiliate = findAffiliateByCode($_COOKIE['mu_ref']);
if ($affiliate && $affiliate['account_id'] != $newAccountId) {
registerReferral($affiliate['id'], $newAccountId, $ipHash);
}
}
The $affiliate['account_id'] != $newAccountId check already blocks the most obvious case of self-referral (the same account clicking its own link).
Commission models
| Model | How it works | Advantage | Risk |
|---|---|---|---|
| Flat percentage | X% on every recharge from the referred player, forever | Simple to communicate | Can get expensive with high-spending accounts |
| Percentage with monthly cap | X% up to a Coins/month limit per referral | Predictable for cash flow | Less attractive to large promoters |
| Decreasing percentage | E.g. 20% in month 1, 10% afterward | Encourages a steady stream of new referrals | More complex to explain |
| Fixed bonus per validated signup | Fixed amount when the referral reaches level X | Easy to estimate total cost | Doesn't reward large recharges |
For most Brazilian servers, a flat percentage between 5% and 15% on recharges is the simplest and most proven starting point.
Affiliate dashboard
Without opening a ticket, the player needs to see at least: a ready-to-copy referral link, click count, confirmed signup count, total recharges generated by referrals, and available balance for redemption. A minimal dashboard can reuse the layout of the existing account panel on the site, adding an "Affiliates" tab. The more transparent the statement, the lower the volume of support tickets questioning commission.
Anti-fraud rules
Fraud is the biggest risk in this system, because commission turns into money (or Coins, which has market value). The minimum protections:
- Block a referral when referrer and referred share an IP, browser fingerprint, or payment method.
- Only release a commission as
approvedafter the payment gateway confirms the recharge (never at click or signup time). - Enforce a holding period (7-14 days) between
approvedandpaid, to cover refunds and chargebacks. - Cap the number of "recharging" referrals per day coming from the same affiliate, to detect account farms.
- Manually audit affiliates with commission above a cutoff value before the first payout.
Commission redemption process
Set a minimum redemption amount (e.g. 500 Coins) and a frequency (e.g. redemptions released once a week). Redemption can credit the game account directly (simplest) or generate a coupon usable in the shop. Avoid instant redemption without review — that's the point where successful fraud turns into real losses.
Promoting the program
Announce the program on the official Discord, highlighting the commission, the payout timeline, and real earnings examples from already-active affiliates (with their permission). A fixed banner at the top of the site with "Refer and earn" and a direct shortcut in the panel menu increase adoption at no extra cost.
Integration with the admin panel
The admin needs a screen to: list affiliates, adjust commission_rate individually (for special partnerships with big streamers), manually approve or reject suspicious commissions, and export a referral report by period for financial review.
Metrics to track
| Metric | Why it matters |
|---|---|
| Click-to-signup conversion rate | Measures the quality of traffic brought by the affiliate |
| Signup-to-recharge conversion rate | Measures the real quality of the referred player |
| Average ticket of referred players | Compares referrals against organic players |
| Cost of acquisition via affiliate | Total commission paid / new paying players |
| Top 10 affiliates by volume | Identifies partners for negotiating special commission rates |
Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Referral cookie isn't saved | Cookie domain or path misconfigured | Set the path to / and confirm the site domain |
| Commission paid without a confirmed recharge | Payment trigger tied to signup, not the gateway | Move the trigger to the approved-payment callback |
| Same player self-referring | Missing IP/duplicate-account check | Add IP hash and account validation to the referrals table |
| Affiliate doesn't see an updated statement | Dashboard isn't querying affiliate_commissions in real time | Review the dashboard query and caching |
| Spike of suspicious referrals in one day | Account farm generating fake commission | Enable a daily limit and manual review above a cutoff value |
Launch checklist
- Affiliate, referral, and commission tables created.
- Tracking cookie working with a defined expiration.
- Commission model chosen and publicly documented.
- Affiliate dashboard displaying clicks, signups, and balance.
- Anti-fraud rules (IP, duplicate account, holding period) active.
- Redemption process with minimum amount and frequency defined.
- Admin panel to approve/adjust commissions.
- Program announced on Discord and on the site.
With the affiliate program live, the next step is connecting this base of engaged players to other community and monetization initiatives, starting with your project's overall structure — see the complete guide on how to create a MU Online server to make sure your site and server's technical foundation can support this growth.
Frequently asked questions
What's the difference between an affiliate system and a simple referral system?
A simple referral system usually rewards only the invite itself (one fixed reward per account created). An affiliate system is recurring: the affiliate keeps earning a percentage of the referred player's recharges, sometimes for months or indefinitely, functioning as a long-term partnership.
Should I pay commission in Zen, Coins, or real money?
The vast majority of Brazilian servers pay in Coins (the premium shop currency) to keep the incentive inside the server's own ecosystem. Paying in real money requires much stricter tax and anti-fraud controls, so it's rare outside large projects.
How do I stop the server admin from creating fake accounts to refer themselves?
Tie commission payout to a real recharge validated by the payment gateway, never to a standalone signup. Also block referrals where the referred player and the referrer share the same IP or payment method.
Do I need a separate dashboard for affiliates?
It's not mandatory, but it greatly improves adoption. A simple dashboard showing clicks, signups, recharges generated, and commission balance provides transparency and reduces support tickets asking for statements.
Is it worth having affiliate tiers (bronze, silver, gold)?
Yes, especially if the server already has a community of streamers and large promoters. Tiers with progressive commission encourage those already bringing in high volume to keep investing in promotion.