What you’re building
A self-hosted affiliate-link manager that gives you clean branded URLs, tracks every click server-side, and shows you which posts actually convert. No third-party redirect service. No monthly SaaS fee.
The Amazon Associates / ShareASale / Impact / Awin workflow that thousands of affiliates pay for, running entirely inside your WordPress install.
Why people search for this
The default affiliate link is ugly and untrackable:
https://www.amazon.com/dp/B08L5TNJHG?tag=yoursite-20&linkCode=ll1&...
You can’t read it, you can’t share it on social without it looking like spam, and Amazon strips the affiliate tag whenever a copy-paste loses encoding. ThirstyAffiliates fixes the URL part for $99/year. ClickMagick adds tracking for another $797/year. Pretty Links does both for $99/year.
WB Ad Manager does both for $0/year. Free, open-source, no key, no quota.
The setup in three minutes
- Install + activate WB Ad Manager (free). Pick the “Link Cloaker” feature on the welcome screen.
- Add your first cloak. Plugin > Cloaker > Add new. Paste the long affiliate URL. Set the slug (e.g.
coursera-react). Done. Your branded link isyoursite.com/go/coursera-react. - Drop the link in a post. Same as any internal link. Plugin tracks every click — referrer, user-agent, timestamp, geolocation, IP hash.
What you see in the dashboard
For every cloak:
- Total clicks, broken down by day / week / month.
- Top referrers so you know which post drives clicks.
- Geographic split for region-restricted offers.
- Device split so you don’t waste mobile-only offers on desktop traffic.
If a post you wrote two years ago suddenly starts earning, you’ll see it before the merchant’s report does.
The AdSense conflict you don’t want to hit
Google AdSense forbids cloaking links pointing to AdSense ads (obvious — would inflate clicks). It does NOT forbid cloaking affiliate links to merchants like Amazon, Shopify, Booking.com. WB Ad Manager handles this correctly: cloaked links use a 302 redirect, no DOM injection, no popup interstitial. Compatible with AdSense by default.
Stop manually editing 200 posts when a merchant changes their URL
When Coursera rebrands a course URL (or Amazon’s ASIN changes), you change ONE cloak entry. Every post that linked to /go/coursera-react now points to the new destination automatically.
The first time you have to retire a dead affiliate link across 300 posts without the cloaker, you’ll wish you started with it.
When to upgrade to Pro
The free plugin handles cloaking + tracking. Pro adds:
- Rotation between multiple destinations.
/go/web-hostrotates between Bluehost, SiteGround, Kinsta. Best-performing one floats up via the click-through rate. - Geo-routing. US visitors get Amazon.com, UK visitors get Amazon.co.uk, German visitors get Amazon.de. One link, automatic regional routing.
- Time-based rotation. Black Friday week → swap in deal URLs. Auto-revert when sale ends.
- CSV export of all click data for tax reporting or merchant-side reconciliation.
Most affiliates stay on the free plugin for the first year. Upgrade when geo-rotation or AB-testing starts mattering more than the $59 license cost.
Migration from ThirstyAffiliates / Pretty Links
WB Ad Manager imports both. ThirstyAffiliates exports an XML/CSV. Pretty Links exports CSV. Plugin > Cloaker > Import wizard, pick the file, hit go. Existing slug structure (/recommends/, /go/, custom prefix) is preserved so backlinks don’t break.
Test migration on a staging copy first. Production cutover takes under a minute.
Common pitfalls
- 301 vs 302. Use 302 for affiliate cloaks. 301 gets cached forever and you can’t change the destination. WB Ad Manager defaults to 302; don’t change it.
/go/slug clashing with other plugins. If you already have a plugin reserving/go/, change the WB Ad Manager prefix to/out/or/aff/in Settings.- Nofollow + sponsored. Plugin adds
rel="nofollow sponsored"to cloaked links by default. Google requires this for affiliate content per their 2020 guidance. Don’t disable. - robots.txt allow. Make sure
/go/*isn’t blocked in robots.txt. It rarely is by default, but theme migrations have been known to introduce odd rules.
Useful integrations
- Yoast / Rank Math — cloaked links auto-add
rel="nofollow sponsored"per Google guidance. - Google Analytics 4 — cloaked clicks fire a
clickevent with custom dimensionaffiliate_slug. Add the dimension in GA4 once, then revenue tracking is automatic. - Cloudflare cache —
/go/*paths bypass cache automatically so tracking is real-time.
Ship checklist
- Plugin installed + activated, Link Cloaker feature enabled
- Default slug prefix chosen (
/go/,/out/, or branded like/best/) - nofollow + sponsored attributes ON (default)
- AdSense placements on same page tested (no policy conflict)
- Top 10 most-trafficked affiliate posts updated to use cloaked URLs
- Migration from old cloaker (if any) verified — no 404s on existing backlinks
Then publish, sleep, watch the dashboard tomorrow morning.