Use approved Amazon Associates or Impact links with a direct default and optional country alternatives. It needs WPLocation Free and Pro on the same site.
1. Install and check the location source
- Install and activate WPLocation Free 1.1.9 and Pro 1.4.4. Configure a supported private GeoLite2 Country source in Free and test a known IP in Diagnostics.
- Open My Account → Downloads and download the Affiliate Link Localization 1.0.0 ZIP. Install it under Plugins → Add New → Upload Plugin, then activate it.
- Open WPLocation → Affiliate Links. If Free or Pro is inactive, the add-on pauses and saved link settings remain in WordPress.
2. Choose the partner link workflow
Amazon Associates with OneLink
Configure OneLink in your own Associates Central account, then choose Amazon OneLink (no overrides). Paste one approved Amazon Special Link as the default. The plugin leaves that URL unchanged; Amazon handles its own international marketplace matching after a visitor clicks. OneLink setup, eligibility, marketplace coverage and matching are determined by Amazon. See Amazon’s OneLink guidance.
Manual Amazon country links
Choose Manual country links to enter your approved direct Amazon URL for each relevant marketplace. Full Amazon URLs must carry the tracking tag supplied for your account; Amazon’s own amzn.to links are also supported. Do not paste generic link shorteners. Verify each URL and its tracking tag in your Associates account. The plugin does not rewrite tags or create a hidden redirect.
Impact partner links
Choose Impact and paste the tracking URL supplied by your partner account as the default. Add country alternatives only when the brand permits those destinations and deep links. WPLocation preserves the URLs you enter, including query parameters, and does not use Impact API credentials. Impact documents how to check deep-link permission and create a permitted deep link.
3. Save, preview and place a link
- Give the link a private name and enter a required direct HTTPS default. Unknown countries and failed lookups use this URL.
- In manual mode, add one country and approved URL per row. Each link supports up to 30 countries. Confirm that your links are approved and that you will include any required affiliate disclosure.
- Save paused, select the link and test a matching country, a non-matching country and Unknown in the saved preview. Then edit it and check Active.
- Place a Shortcode block where the link belongs:
. Replace 123 with the ID shown in the Affiliate Links list. The link usesrel="sponsored nofollow noopener". Add a clear affiliate disclosure to the page as your programs require.
Use new_tab="yes" in the shortcode only if opening a new tab fits your site experience. Paused, trashed, invalid or missing links render nothing. The add-on does not change ordinary links elsewhere on the site.
4. Verify the real cache path
The page HTML always contains the same direct default partner URL. A small WordPress AJAX request, sent with no-store headers, selects a country URL after the page loads and changes only the anchor destination. If JavaScript, location lookup or the AJAX request fails, the direct default stays available. This design avoids a country-specific cached page body, but it still needs the AJAX request to reach WordPress.
- Open the published page in a fresh browser. Inspect the final link destination after it loads and click only when you intend to visit the partner site.
- Test a country that has an alternative, an unlisted country and an unknown-location case. Test once with JavaScript disabled: the approved default should remain usable.
- Repeat through your actual CDN/page cache. Bypass caching for
/wp-admin/admin-ajax.phpif necessary. Do not cache thewpl_aff_resolveresponse by country; it carries no-store headers. - Check the destination and tracking in your Amazon Associates or Impact account. WPLocation does not verify a commission or that a brand will accept the link.
Privacy and maintenance
Saved link settings are private WordPress records. Public pages contain the direct default destination, and a read-only country request returns only the selected URL. The add-on does not save visitor IPs, clicks, orders, customer IDs, or commissions and does not call a hosted WPLocation service. Your affiliate networks may have their own tracking and privacy practices; disclose them as appropriate.
To update this separate add-on, download the current ZIP from My Account and replace the installed plugin after backing up. Deactivation leaves saved link settings in place. WordPress may show raw shortcode text when the add-on itself is inactive, so remove or replace shortcode placements before deactivation. WPLocation Free and Pro continue to work without this add-on.
Contact WPLocation with your software versions and the result you expected. Keep keys and customer data private.
