Description
Kitgenix Affiliate Link Manager is a self-hosted WordPress affiliate link manager for creating branded short links, controlling redirect destinations, organising campaigns and measuring aggregate click activity without relying on a hosted Kitgenix tracking platform.
It is built for affiliate marketers, publishers, content websites, agencies, review sites, WooCommerce stores and other WordPress sites that publish external campaign or partner links. Instead of scattering long destination URLs throughout your content, publish a stable first-party URL such as example.com/go/product-name/ and manage the destination behind it from WordPress. The public short link can remain unchanged even when the affiliate destination changes.
Learn more about the developer behind the plugin at Kitgenix.
Key Features
- Create branded short URLs on your own WordPress domain.
- Configure the global redirect prefix used before link slugs.
- Change destinations without changing the public short URL.
- See who changed a link destination and when, and restore an earlier address with one click.
- Insert and search saved affiliate links from the block editor without copying slugs manually.
- Enable or disable individual links without deleting them.
- Choose the redirect status used for managed links.
- Add
nofollow,sponsored, ornofollow sponsoredrelationship guidance to link records. - Schedule when links become active and when they expire, with a fallback URL for other cases.
- Rotate one public link across several destination URLs using sequential or random rotation.
- Organise links with groups and tags; search, filter, sort, duplicate and bulk-manage records.
- Record aggregate click analytics without storing visitor IP addresses.
- Run automatic and manual destination health checks.
- Import and export links using CSV and JSON workflows.
- Manage links programmatically through authenticated REST API routes or WP-CLI.
See the “Other Notes” section below for full details on each feature area.
Branded Redirects and Stable Short Links
Each managed link has a WordPress-controlled slug. The plugin combines that slug with the configured redirect prefix to create the public-facing URL. A prefix such as go and a slug such as hosting-offer produces a route similar to /go/hosting-offer/.
When a visitor requests that route, the redirect layer resolves the matching link, checks whether it is enabled and currently active, evaluates any start/expiry rules, chooses the appropriate destination, records the aggregate click event and then issues the configured redirect. The underlying affiliate URL can be changed later while the public URL remains stable.
The managed link records are stored in the private kitgenix_aff_link post type. Groups use the kitgenix_aff_group taxonomy and tags use kitgenix_aff_tag, allowing large collections of campaigns to be organised without exposing those records as normal public posts.
Block Editor Affiliate Link Picker
This is a text-formatting option inside text blocks (Paragraph, Heading, List, and similar) – not a separate block you add from the block inserter’s “+” menu, so searching the inserter for “Affiliate link” will not find it.
To use it: select some text inside a text block, then open the block toolbar’s More rich text controls button – the small overflow/chevron icon next to Bold, Italic and Link – and choose Affiliate link. That opens a searchable list of saved links; pick one and the selected text is linked to its branded short URL, with the link’s rel value applied automatically. If no text is selected, the link name is inserted for you. An “Open in new tab” toggle is included, and the same button can change or remove an existing affiliate link.
Anyone who can write posts can use the picker. It only shows link names and short URLs, never the underlying affiliate destinations. The button only appears for users who can edit_posts (filterable with kitgenix_affiliate_picker_capability); a user without that capability won’t see it at all, with no error shown.
Destination Change History
Every time a link’s destination changes, the plugin records the previous and new address, who made the change, when it happened, and where it came from (admin screen, REST API, WP-CLI, import, duplicate or restore). The original address is recorded when a link is created.
Open a link’s Edit screen (or use the History row action) to review the changes. You can restore an earlier address with one click if a merchant URL was changed by mistake.
Scheduling, Expiry and Fallback Destinations
Campaigns frequently have start dates, expiry dates or time-sensitive offers. Each link can store a start timestamp and expiry timestamp so the redirect state is evaluated automatically at request time.
A fallback URL can be used when the normal destination should not be used. This is useful for expired promotions, not-yet-active campaigns, retired products or other cases where sending a visitor to an alternative page is better than leaving a dead affiliate link in published content.
Because the schedule is evaluated by the redirect resolver, the behaviour is functional rather than a wp-admin label only.
Destination Rotation
A single branded link can distribute requests across a pool of destinations. The plugin supports no rotation, sequential rotation and random rotation. The primary destination and additional rotation destinations form the available pool used by the redirect logic.
Rotation can be useful for publishers testing several offers, balancing traffic between equivalent landing pages, or maintaining one memorable public URL while working with multiple destination URLs.
Link Groups, Tags and Bulk Administration
Groups and tags provide two layers of organisation. The admin interface also includes search, filtering, sorting and bulk operations, making it practical to manage more than a handful of redirects.
Bulk tools include assigning groups and adding tags to selected links. Existing links can be duplicated to create a new campaign from a known configuration, and links can be enabled or disabled independently of deletion.
Aggregate Click Analytics
The analytics subsystem stores daily aggregate statistics in the plugin-owned {prefix}kitgenix_aff_click_stats database table. It can report total clicks, recent click trends and breakdowns by source, placement and normalised referrer host.
The click-statistics implementation is intentionally aggregate. It does not store the visitor’s IP address, full browser user-agent, full referring URL, tracking cookie or browser fingerprint as part of the analytics record. Referrer data used for reporting is reduced to the host before storage.
The plugin also maintains link-level click totals and cached overview data so the admin interface does not need to reconstruct every summary on every page load.
Affiliate Destination Health Checks
Managed destinations can become unavailable, start returning errors or redirect somewhere unexpected. The health-check system can inspect configured destinations and retain the resulting status, message, HTTP code, final URL, redirect-hop count and time of the last check.
Health checks can run automatically using WordPress scheduled events or can be started manually for a link. The automatic checker processes the catalogue in batches and maintains a cursor/summary so a large link library does not need to be tested in one request.
Health checking sends a normal server-side HTTP request to the destination selected by the site administrator. The destination website therefore receives ordinary request/network information. The plugin does not send those checks through a Kitgenix proxy.
CSV and JSON Portability
Import/export tools are available for administrators who need to move links between WordPress environments or update them in bulk. CSV output includes protection against spreadsheet-formula injection, and JSON is available where a structured interchange format is more convenient.
Import processing validates and normalises incoming records and uses bounded batch sizes. Existing records can be matched according to the supported import workflow instead of every import being treated as a completely new link.
REST API for Affiliate Links
The authenticated REST namespace is:
kitgenix-affiliate-link-manager/v1
The codebase implements routes for listing, creating, reading, updating and deleting links, plus import/export, enable/disable, duplication, click-reset, health-check, destination-history and destination-restore actions. Collection requests support common filters such as search, group, tag, enabled state, ordering and pagination.
REST management is protected by the plugin’s management capability checks; the plugin does not expose anonymous link administration. The block editor’s read-only GET /links/picker search route only needs the edit_posts capability.
WP-CLI
The command base is:
wp kitgenix-affiliate link
Implemented commands include get, create, update, disable, enable, duplicate, reset-clicks, check-health, history, restore-destination, delete, export and import.
These commands make the plugin suitable for scripted migrations, deployment workflows and administrators who prefer command-line management.
Privacy-Focused, WordPress-Native Storage
Link records, taxonomies, settings, logs and aggregate analytics are stored in WordPress or the site’s own database. The plugin uses WordPress posts, metadata, taxonomies, options, scheduled events, the HTTP API, REST API and capability/nonce controls.
There is no remote Kitgenix click-tracking account required to create or use links. External network activity is limited to actions that inherently require it, such as redirecting a visitor to the destination, checking a destination’s health, retrieving public Kitgenix plugin information for the shared admin Hub, or loading the disclosed admin font service.
Typical Use Cases
- Affiliate marketing links in comparison articles and product reviews.
- Branded
/go/links in newsletters or social campaigns. - Stable URLs for printed material and QR codes.
- Time-limited promotions that should start or expire automatically.
- Campaign links that need a safe fallback after an offer ends.
- Testing or distributing traffic across multiple destinations.
- Agencies managing many partner links from one WordPress dashboard.
- Sites that need aggregate click reporting without visitor-level profiling.
Configuration
Redirect prefix
The prefix forms the path before each link slug. For example, a prefix of go and slug of example-offer produces a public path similar to /go/example-offer/.
Choose a prefix that does not conflict with an existing page, post, taxonomy, endpoint, or other rewrite rule.
Redirect status
The plugin allows the redirect status to be configured and exposes a developer filter before the final redirect is issued. Select the status that matches how you intend the branded URL to behave and how permanent the destination relationship is.
Health-check timing
Health checks create outbound requests to configured destination URLs. A very aggressive schedule on a site with thousands of links can create unnecessary background HTTP traffic. Use a frequency and timeout appropriate for your catalogue size and hosting limits.
Uninstall cleanup
The settings include an uninstall-data choice. By default, uninstall is conservative so an accidental plugin deletion does not automatically destroy affiliate link records and analytics. Enable deletion only when you intentionally want plugin-owned data removed during uninstall.
Developers
Data model
Private post type: kitgenix_aff_link
Taxonomies:
kitgenix_aff_groupkitgenix_aff_tag
Primary post meta includes destination URL, click count, rel guidance, enabled state, campaign note, schedule timestamps, fallback URL, rotation settings, destination-health fields, and the capped destination change history.
The plugin-owned aggregate analytics table is:
{prefix}kitgenix_aff_click_stats
The main settings option is:
kitgenix_affiliate_link_manager_settings
Additional options are used for analytics schema versioning, aggregate totals, destination-health progress/summary, and the event log.
REST namespace
kitgenix-affiliate-link-manager/v1
See the Description section above for the route list.
WP-CLI base command
wp kitgenix-affiliate link
Filters
kitgenix_affiliate_destination_url– filter the resolved destination before redirect.kitgenix_affiliate_redirect_status– filter the HTTP redirect status.kitgenix_affiliate_slug_cache_ttl– adjust the redirect slug-lookup cache TTL.kitgenix_affiliate_manage_capability– change the capability required to manage affiliate links.kitgenix_affiliate_health_check_timeout– adjust destination health-check timeout.kitgenix_affiliate_max_import_items– adjust the maximum number of import rows. Default: 2,000.kitgenix_affiliate_list_records_limit– adjust the internal maximum records loaded by applicable REST/WP-CLI list, export, and matching operations. Default: 5,000.kitgenix_affiliate_picker_capability– change the capability required to use the block editor link picker. Default:edit_posts.kitgenix_affiliate_destination_history_limit– adjust how many destination history entries are kept per link. Default: 50.
Actions
kitgenix_affiliate_redirected– fires after click counting and immediately before the redirect exits. The action receives the post ID, slug, destination, and HTTP status.
Scheduled events
The health checker uses plugin scheduled events including kitgenix_affiliate_run_health_checks and kitgenix_affiliate_run_health_checks_once. A custom kitgenix_affiliate_thirty_minutes schedule is registered when the 30-minute interval is used.
Security & Privacy
The plugin is designed so that link management remains an authenticated WordPress administration task. Admin operations use WordPress capabilities and nonce validation where appropriate, and REST management endpoints apply permission checks.
Redirect input and stored fields are sanitised/normalised according to their purpose. Health-check and redirect destinations are URL values supplied by authorised site administrators.
Click analytics are aggregate rather than a persistent visitor profile. The analytics table does not store visitor IP addresses, full user-agent strings, full referrer URLs, cookies, or device fingerprints. Source, placement, and normalised referrer host can be stored as aggregate dimensions.
The plugin can make outbound HTTP requests to administrator-configured destination URLs for health checking. Site owners remain responsible for ensuring their use of affiliate links, analytics, and any destination services complies with applicable privacy, disclosure, advertising, and affiliate-marketing requirements.
External Services
Affiliate destination websites
When a visitor follows a branded affiliate link, their browser is redirected to the destination URL configured by the site administrator. That destination is an external service/site selected by the administrator and is not controlled by this plugin. The destination will receive the request after redirect according to normal web behaviour and its own privacy terms.
Destination health checking
When destination health checks run, WordPress sends a server-side HTTP request to the destination URL configured for the affiliate link. This is required to determine response status, redirects, and final destination health. The remote destination may receive the requesting server’s IP address and standard HTTP request information.
WordPress.org plugin information
The shared Kitgenix admin interface can request public plugin-directory information from WordPress.org, such as active-install or rating/media information used in Kitgenix screens. This request is administrative and is not required for public affiliate-link redirects.
WordPress.org terms/privacy: https://wordpress.org/about/privacy/
The plugin does not require a Kitgenix cloud service to process affiliate redirects or aggregate click tracking.
Uninstall
By default, uninstall keeps the affiliate-link records and analytics so deleting the plugin does not unexpectedly destroy campaign history.
If the plugin’s delete-data-on-uninstall option is enabled before uninstalling, the cleanup routine can remove plugin-owned affiliate link posts, related metadata/terms, options, transients, and the aggregate analytics table. Review backups and retention requirements before enabling destructive cleanup on a production site.
Support
For product information and Kitgenix resources, visit Kitgenix.
When reporting an issue, include the plugin version, WordPress version, PHP version, relevant reproduction steps, and any non-sensitive diagnostic code shown by the activity/health tools. Do not post affiliate credentials, private destination tokens, or other secrets in public support channels.
Support Development
If Kitgenix Affiliate Link Manager is useful to your site, you can support continued development by leaving a WordPress.org review, sharing constructive feedback, contributing code where appropriate, or using the donation link listed at the top of this readme.
Credits
Kitgenix Affiliate Link Manager is developed by Kitgenix and built on WordPress APIs and conventions.
Installation
- Upload the
kitgenix-affiliate-link-managerfolder to/wp-content/plugins/, or install the plugin ZIP through Plugins > Add New > Upload Plugin. - Activate Kitgenix Affiliate Link Manager.
- Open the Kitgenix Affiliate Link Manager admin screen.
- Review the redirect prefix and redirect behaviour before publishing links.
- Create an affiliate link, choose its slug, and enter the destination URL.
- Add optional scheduling, fallback, rotation, group, tag, and campaign-note settings as required.
- Test the branded redirect before using it in a live campaign.
- If destination health checking is enabled, review the health-check interval and timeout for your hosting environment.
After changing a redirect prefix, visit Settings > Permalinks and save if WordPress rewrite rules need to be refreshed on your environment.
FAQ
Does this plugin require an external affiliate network account?
No. The plugin manages the redirect URLs and analytics inside WordPress. The destination URL can point to an affiliate network, merchant, landing page, or another URL chosen by the site administrator.
Does Kitgenix receive my click analytics?
No Kitgenix analytics relay is required for the plugin’s click tracking. Aggregate click statistics are stored in the WordPress database on the site running the plugin.
Does the click tracker store visitors’ IP addresses?
The aggregate analytics implementation does not store visitor IP addresses in its click-statistics records. It also does not store a full user-agent string, full referrer URL, tracking cookie, or browser fingerprint there. Referrer data is reduced to the host for aggregate reporting.
Can I change an affiliate destination without changing the public link?
Yes. That is one of the main purposes of a branded redirect. Update the link’s destination while keeping its slug/public URL in place.
Can I see who changed a destination, or undo a change?
Yes. Each link keeps a Destination History showing every address change, who made it and when. Open the link’s Edit screen and use “Restore previous” or “Restore original” to switch back to an earlier address.
Can I insert affiliate links from the block editor?
Yes, but it’s not a block you add from the inserter’s “+” menu – it’s a text-formatting option, so the inserter won’t show it. Select some text inside a text block, open the block toolbar’s “More rich text controls” button (the small overflow icon next to Bold/Italic/Link) and choose “Affiliate link” to search your saved links and insert one. If that option doesn’t appear at all, the current user likely lacks the edit_posts capability (or whatever capability kitgenix_affiliate_picker_capability has been changed to).
Can links start or expire automatically?
Yes. Link records support start and expiry timestamps. A fallback URL can also be configured for states where the normal destination should not be used.
Can one link rotate between several destinations?
Yes. The code supports a rotation mode and a pool of rotation destinations on each link.
Can I organise a large number of links?
Yes. Use groups and tags, plus the admin search, filters, sorting, and bulk actions.
Can I import or export links?
Yes. CSV and JSON workflows are implemented. The CSV exporter also neutralises values that could otherwise be interpreted as formulas by spreadsheet applications.
Is there a REST API?
Yes. The plugin provides authenticated management routes under kitgenix-affiliate-link-manager/v1 for listing, creating, updating, deleting, importing, exporting, enabling/disabling, duplicating, resetting click counts, and checking destination health.
Is WP-CLI supported?
Yes. Use wp kitgenix-affiliate link and one of the implemented subcommands.
Will uninstall delete all affiliate links?
Not by default. The uninstall behaviour is intentionally conservative. If the delete-data-on-uninstall setting is enabled, the plugin can remove its affiliate link records and plugin-owned analytics data during uninstall.
Screenshots







Changelog
2.2.0 (30 October 2026)
- Fix: Sequential rotation could stick to one destination on sites running a persistent object cache (Redis, Memcached), because an atomic click-count update bypassed WordPress’s post meta cache. The cache is now cleared immediately after each click is recorded.
- Fix: The network-wide click total could drift under concurrent traffic. It’s now updated with an atomic SQL increment instead of a read-then-write, the same approach already used for each link’s own click count.
- Security/Improved: Redirects are no longer cacheable by page caches and CDNs, which could otherwise freeze rotation/scheduling/expiry, skip click counting, and let search engines index short
/go/URLs. Redirects now send no-cache headers andX-Robots-Tag: noindex, nofollow, set theDONOTCACHEPAGE/DONOTCACHEDBconstants, and exclude the redirect prefix from WP Rocket. - New: Added an Affiliate Link picker to the block editor. Choose “Affiliate link” from the rich-text toolbar’s More menu to search saved links by name or slug and insert their branded short URL. The link’s
relvalue is applied automatically, with an optional “Open in new tab” toggle. If no text is selected, the link name is inserted as the anchor text. - New: Added
GET /links/pickerto the REST API. It is a lightweight name/slug search for the editor picker, available to users withedit_posts(filterable viakitgenix_affiliate_picker_capability). It returns names and short URLs only, never destination URLs. - New: Added Destination History. Every destination change, including the original address when a link is created, is recorded with who made it, when, and where it came from (Admin, REST API, WP-CLI, Import, Duplicate or Restore). Up to 50 entries are kept per link, filterable via
kitgenix_affiliate_destination_history_limit. - New: The Edit Link screen now has a Destination History panel with one-click “Restore previous” and “Restore original” actions. A new “History” row action on the Links table opens it.
- New: Added
GET /links/{id}/historyandPOST /links/{id}/history/{entry}/restoreto the REST API. - New: Added
historyandrestore-destinationWP-CLI subcommands. - Improved: Destination restores are recorded in the Log tab.
- Fix: The shared “kitgenix” icon collection/icon was registered unconditionally on
init, so on a site running more than one Kitgenix plugin, every plugin after the first to load triggered an “Icon collection is already registered” notice. It is now only registered if not already present. - Improved: Raised the minimum PHP version to 8.2 (
Requires PHP: 8.2). The activation check now also blocks activation on PHP versions below 8.2. - Improved: Tested up to WordPress 7.4, and reviewed for compatibility with PHP 8.2 to 8.5. The full codebase passes syntax checks on PHP 8.5 and a PHPCompatibility scan for PHP 8.2–8.5, and uses no dynamic properties or functions deprecated in PHP 8.2–8.5.
- Dev: Removed the PluginScore verification code from the readme, as Kitgenix Plugin Score has been discontinued.
- Dev: Bumped the version to 2.2.0 across the plugin.
- Documentation: Shortened the readme’s Description section and moved the detailed feature write-ups into a new Other Notes section, so the plugin directory no longer truncates the Description for exceeding the 2,500-character limit.
- Documentation: Regenerated the
.pottranslation template for 2.2.0. - Documentation: The readme changelog now lists only the current release. The full release history is in
CHANGELOG.md.
Full release history is available in the plugin’s CHANGELOG.md file.
