Appearance
WordPress Plugin
The Fyralynx Affiliate WordPress plugin automatically monetises your existing affiliate links and provides a first-class link creation experience inside the WordPress editor. It connects to your Fyralynx account via API key and requires Publisher tier ($39/month) or above.
What the Plugin Does
Auto-monetises existing links - On every page render, the plugin scans post HTML for bare merchant URLs from Fyralynx's 35 supported merchants and replaces them with Fyralynx routing URLs. This happens transparently without touching the stored post content.
Gutenberg block - A dedicated "Fyralynx Affiliate Link" block in the block editor lets you create, preview, and insert optimally-routed affiliate links without leaving WordPress.
Classic editor widget - A toolbar button for sites using the Classic Editor plugin.
Per-post passthrough - Mark individual posts as "passthrough" to prevent the plugin from modifying any links in that post. Useful for brand partnership posts where exact link parameters are required.
Commission rate alerts - Commission rate change alerts from the Fyralynx knowledgebase are surfaced in the WordPress admin dashboard, so you know immediately when rates change for merchants you frequently link to.
Requirements
| Requirement | Version |
|---|---|
| WordPress | ≥ 6.0 |
| PHP | ≥ 8.1 |
| Fyralynx plan | Publisher ($39/month) or Enterprise |
| API key | Publisher or Enterprise API key from Fyralynx dashboard |
Installation
Method 1 - WordPress.org Plugin Directory (Recommended)
- In your WordPress admin panel, go to Plugins → Add New.
- Search for "Fyralynx Affiliate".
- Click Install Now, then Activate.
Method 2 - Manual Upload
- Download
fyralynx-affiliate.zipfrom your Fyralynx dashboard (Settings → WordPress plugin). - In WordPress admin, go to Plugins → Add New → Upload Plugin.
- Upload the zip file and click Activate Plugin.
Method 3 - Composer / WPackagist
bash
composer require wpackagist-plugin/fyralynx-affiliateConfiguration
After activation, navigate to Settings → Fyralynx Affiliate in your WordPress admin panel.
Step 1 - Enter Your API Key
Enter your Fyralynx API key in the API Key field. Generate an API key at fyralynx.com/dashboard/api-keys. Publisher and Enterprise keys are supported.
Click Test Connection to verify the key works. You should see:
✅ Connected - Publisher plan. 42,318 / 50,000 clicks used this period.Step 2 - Configure Network Accounts
Fyralynx needs to know which affiliate networks your WordPress site's links use. Under Network Accounts, add your account details for each network:
| Network | What to enter |
|---|---|
| Amazon Associates | Your Amazon tag (e.g. yoursite-20) |
| CJ | Your CJ Publisher Site ID |
| Awin | Your Awin Publisher ID |
| Impact | Your Impact Publisher ID |
| Admitad | Your Admitad publisher ID |
| Cuelinks | Your Cuelinks Site ID (open to creators worldwide; India-focused) |
| Rakuten | Your Rakuten EAN and Site ID |
| Involve Asia | Your Involve Asia Affiliate ID |
Only networks you have accounts with need to be configured. Fyralynx will never route through an unconfigured network.
Step 3 - Set Default Routing Preset
Choose the default routing preset for auto-monetised links:
- Auto (Balanced) - Recommended for most sites.
- Long-form Content - Prioritises EPC and deep-link quality; ideal for review articles.
- Link-in-Bio - Mobile-first routing; best for short-form posts shared on social.
You can override this preset per post or per Gutenberg block.
Step 4 - Configure Passthrough Merchants
Some merchants (Flipkart, Noon, Jumia) use in-house affiliate programs where your affiliate tag is already embedded in the URL from the merchant's dashboard. For these, you should add the merchant to the Passthrough Merchants list. Fyralynx will preserve your existing affiliate URLs for these merchants exactly as-is.
Default passthrough merchants (pre-configured):
- Flipkart (
flipkart.com) - Myntra (
myntra.com) - Noon (
noon.com) - Jumia (
jumia.com.ng,jumia.co.ke, etc.)
Auto-Monetisation Behaviour
How It Works
The plugin hooks into WordPress's the_content filter - the standard hook called when post content is rendered for display. On each page render, it:
- Parses the post HTML with a DOM parser.
- Finds all
<a>elements whosehrefpoints to a supported Fyralynx merchant domain. - Skips links that already contain a Fyralynx routing URL.
- Skips links in posts marked with
fyralynx_passthrough: truepost meta. - For each remaining link: calls
POST /v1/linkswith the original URL, caches the result in post meta. - Replaces the original
hrefwith the Fyralynx routing URL.
The stored post content is never modified. The replacement happens only in the rendered output. Your original URLs are preserved in the database.
Caching
After a link is first routed, its Fyralynx URL is cached in post meta:
Key: _fyralynx_link_{hash(original_url)}
Value: { routeUrl, merchantId, networkId, cachedAt }On subsequent page renders, the cached URL is used without an API call. The cache is automatically invalidated:
- When you update the post.
- When the Fyralynx plugin settings change.
- After 7 days (configurable in settings - default 7 days).
- Manually via Fyralynx → Clear Link Cache in the admin menu.
What the Plugin Does NOT Do
- Does not modify stored post content - your database is unchanged.
- Does not process links in admin or preview contexts - routing URLs only appear in public-facing rendered output.
- Does not send post content to Fyralynx servers - all URL parsing happens locally within the plugin using PHP regex.
- Does not modify links already containing Fyralynx routing URLs - no double-routing.
- Does not process passthrough-flagged posts - posts with the
fyralynx_passthroughmeta flag are entirely skipped. - Does not modify links on the Passthrough Merchants list - these pass through with your existing affiliate URL intact.
Gutenberg Block
The Fyralynx Affiliate Link block provides a full link creation experience inside the block editor.
Inserting the Block
- In the block editor, click the + button to add a new block.
- Search for "Fyralynx" or find it under the Embeds category.
- Select Fyralynx Affiliate Link.
Block Interface
The block displays:
- URL input - Enter the product URL you want to affiliate-link to.
- [Route] button - Calls the Fyralynx API and shows the routing decision preview.
- Routing preview - Displays merchant, network, region, normalised EPC, and confidence score.
- Title field - Pre-populated from the page title (editable).
- Link text - The anchor text displayed to your readers (editable).
- Preset selector - Override the default routing preset for this specific link.
Block Output
When saved and rendered, the block produces a standard HTML anchor tag:
html
<a href="https://go.fyralynx.com/r/abc123def"
data-fyralynx-merchant="amazon"
data-fyralynx-network="Impact"
rel="nofollow sponsored">
Sony WH-1000XM5 Headphones
</a>The data-fyralynx-* attributes are included for your own analytics tracking (they do not affect Fyralynx's tracking). rel="nofollow sponsored" is set automatically - this is the Google-recommended value for paid/affiliate links and is correct for SEO compliance.
Per-Post Controls
Disabling Auto-Monetisation for a Post
To prevent Fyralynx from routing any links in a specific post:
- Open the post in the block editor.
- In the Document sidebar (right panel), scroll to the Fyralynx Affiliate section.
- Toggle "Passthrough mode for this post" to ON.
This sets the fyralynx_passthrough: true post meta flag. All links in this post are delivered exactly as written.
Clearing the Link Cache for a Post
If you've manually updated affiliate URLs in a post and want Fyralynx to re-route them:
- Open the post in the block editor.
- In the Fyralynx Affiliate panel, click "Clear link cache".
- The next page render will re-route all links via the API.
Alternatively, from Fyralynx → Link Cache in the admin menu, you can bulk-clear all cached links or clear by post ID.
Admin Dashboard Integration
Commission Rate Alerts
The Fyralynx admin menu shows a notification badge when new commission rate changes have been published in the Fyralynx knowledgebase that affect merchants you link to. Click the notification to see:
- Which merchant/network changed.
- Previous and new commission rate.
- Effective date.
- Severity (low / medium / high).
Rate changes are automatically reflected in Fyralynx's routing engine - the epcHints in merchant profiles are updated by the ops team. Your existing routing URLs will route to the better-EPC network on their next page render (after the 7-day cache expires or you clear the cache manually).
Link Cache Overview
Fyralynx → Link Cache shows:
- Total cached links by merchant.
- Links due for cache refresh.
- API call count for the current billing period.
- Cache hit rate (should be > 95% on a well-cached site).
Usage Stats
Fyralynx → Usage shows:
- Clicks used this billing period.
- Click limit for your plan.
- Overage accrued (if any).
- Option to upgrade directly from the admin panel.
WP-CLI Support
The plugin supports WP-CLI commands for server-side management:
bash
# Re-route all cached links (forces API calls for all posts)
wp fyralynx clear-cache --all
# Re-route links for a specific post
wp fyralynx clear-cache --post-id=42
# Show current settings
wp fyralynx status
# Test API connection
wp fyralynx test-connection
# List all cached Fyralynx links with their original and routed URLs
wp fyralynx list-links --format=csv > fyralynx-links.csvREST API Endpoints (WordPress REST API)
The plugin exposes a small set of WordPress REST API endpoints for headless WordPress setups:
GET /wp-json/fyralynx/v1/status
Returns API connection status and current plan usage.
POST /wp-json/fyralynx/v1/route
Body: { "url": "https://..." }
Returns: Fyralynx routing decision for the given URL.
Requires: WordPress administrator capability.
DELETE /wp-json/fyralynx/v1/cache/{postId}
Clears the link cache for a specific post.
Requires: edit_posts capability.Performance Considerations
The auto-monetisation filter adds a small overhead to page rendering:
| Scenario | Added latency |
|---|---|
| All links cached (cache hit) | < 1 ms (post meta read) |
| First render of a post (cache miss) | ~200-400 ms per uncached link (API call) |
| Post with 5 links, all cache miss | ~400-800 ms (concurrent API calls via PHP curl_multi) |
Recommendation: On high-traffic sites, use a page caching plugin (WP Rocket, W3 Total Cache, WP Super Cache) alongside Fyralynx. Page caching captures the rendered output with Fyralynx routing URLs already baked in - subsequent visitors receive the cached page with zero per-render overhead.
The plugin is compatible with all major WordPress caching plugins and respects their cache-clearing hooks.
Multisite Support
The Fyralynx Affiliate plugin is compatible with WordPress Multisite. Each subsite can have its own API key and settings, or you can activate the plugin network-wide with a shared API key. Network activation is managed from Network Admin → Plugins.
Hooks and Filters
The plugin exposes WordPress hooks for developers to customise its behaviour:
php
// Filter the list of URLs that should be excluded from auto-routing
add_filter('fyralynx_excluded_urls', function(array $urls): array {
$urls[] = 'https://mysite.com/special-deal';
return $urls;
});
// Filter the CreateLinkRequest before it's sent to the API
add_filter('fyralynx_create_link_args', function(array $args, string $url): array {
// Override preset for URLs containing 'amazon'
if (str_contains($url, 'amazon')) {
$args['preset'] = 'long-form';
}
return $args;
}, 10, 2);
// Action fired after a link is successfully routed
add_action('fyralynx_link_routed', function(string $originalUrl, array $linkData): void {
// Log or track the routing event
error_log("Fyralynx routed: {$originalUrl} → {$linkData['routeUrl']}");
}, 10, 2);
// Filter the rendered anchor tag attributes
add_filter('fyralynx_anchor_attrs', function(array $attrs, array $linkData): array {
// Add a custom CSS class
$attrs['class'] = 'affiliate-link fyralynx-link';
return $attrs;
}, 10, 2);Troubleshooting
Links are not being replaced
- Check that the API key is valid (Settings → Fyralynx Affiliate → Test Connection).
- Verify the post is not marked as passthrough.
- Check that the merchant is not on your passthrough merchants list.
- Ensure no page caching plugin is serving a stale cached version of the page.
- Check Fyralynx → Link Cache for error entries - API errors are logged there.
Links are replaced but routing to wrong merchant
- Check that the correct network accounts are configured in settings.
- The routing engine only considers networks you have declared accounts with.
- Use Fyralynx → Link Cache → View Trace to see the full CRC trace for a specific link.
Slow page load on first render
This is expected on cache misses (see Performance section above). Solutions:
- Install a page caching plugin.
- Increase the link cache TTL (Settings → Fyralynx Affiliate → Cache TTL).
- Pre-warm the cache using WP-CLI:
wp fyralynx warm-cache.
API errors in the log
Check the error code in Fyralynx → Link Cache → Error Log:
UNAUTHORIZED- API key is invalid or expired. Regenerate at fyralynx.com/dashboard/api-keys.PUBLISHER_TIER_REQUIRED- Your plan has been downgraded below Publisher. The plugin will not route links until you upgrade.RATE_LIMIT_EXCEEDED- Your site is generating too many API calls. Enable page caching to reduce API calls.UNSUPPORTED_MERCHANT- The URL's merchant is not in Fyralynx's supported list. The original URL is used unchanged.
Changelog
See the Fyralynx changelog for plugin version history.
See Also
- Getting Started Guide - extension setup and first link
- Authentication - API key generation for Publisher+ tier
- Rate Limits - avoiding API throttling on high-traffic sites
- Choice Pages - present multiple merchant options in a single link