| 开发者 | kitgenix |
|---|---|
| 更新时间 | 2026年10月30日 18:43 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.4 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
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
nofollow, sponsored, or nofollow sponsored relationship guidance to link records.kitgenix-affiliate-link-manager folder to /wp-content/plugins/, or install the plugin ZIP through Plugins > Add New > Upload Plugin.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
/go/ links in newsletters or social campaigns.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.
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.
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.
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.
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.
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).
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.
Yes. The code supports a rotation mode and a pool of rotation destinations on each link.
Yes. Use groups and tags, plus the admin search, filters, sorting, and bulk actions.
Yes. CSV and JSON workflows are implemented. The CSV exporter also neutralises values that could otherwise be interpreted as formulas by spreadsheet applications.
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.
Yes. Use wp kitgenix-affiliate link and one of the implemented subcommands.
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.
/go/ URLs. Redirects now send no-cache headers and X-Robots-Tag: noindex, nofollow, set the DONOTCACHEPAGE/DONOTCACHEDB constants, and exclude the redirect prefix from WP Rocket.rel value 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.GET /links/picker to the REST API. It is a lightweight name/slug search for the editor picker, available to users with edit_posts (filterable via kitgenix_affiliate_picker_capability). It returns names and short URLs only, never destination URLs.kitgenix_affiliate_destination_history_limit.GET /links/{id}/history and POST /links/{id}/history/{entry}/restore to the REST API.history and restore-destination WP-CLI subcommands.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.Requires PHP: 8.2). The activation check now also blocks activation on PHP versions below 8.2..pot translation template for 2.2.0.CHANGELOG.md.CHANGELOG.md file.