Title: AffLoc — Affiliate Link Localization
Author: AffLoc
Published: <strong>2026 年 3 月 30 日</strong>
Last modified: 2026 年 3 月 30 日

---

搜尋外掛

![](https://ps.w.org/affloc/assets/banner-772x250.png?rev=3494521)

![](https://ps.w.org/affloc/assets/icon-256x256.png?rev=3494521)

# AffLoc — Affiliate Link Localization

 由 [AffLoc](https://profiles.wordpress.org/affloc/) 開發

[下載](https://downloads.wordpress.org/plugin/affloc.0.2.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/affloc/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/affloc/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/affloc/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/affloc/#developers)

 [技術支援](https://wordpress.org/support/plugin/affloc/)

## 外掛說明

AffLoc is a lightweight, cache-friendly WordPress plugin designed to help you maximize
your affiliate revenue globally. It automatically detects your visitor’s country
via IP and swaps out your affiliate links to match their regional store (e.g., Amazon
US vs Amazon UK), ensuring you never lose a commission due to a “Not Available in
Your Country” error.

#### Features

 * **Automatic Geolocation:** Detects visitor country securely and accurately.
 * **Country-Specific Links:** Assign different URLs for the same offer based on
   the user’s country code.
 * **Cache-Friendly:** Uses a hybrid JavaScript approach so it works perfectly with
   caching plugins (WP Rocket, W3 Total Cache, etc.).
 * **Global Fallback:** Define a default link for countries without a specific mapping.
 * **Easy Shortcodes:** Simply use `[affloc_link slug="your-offer"]` and let the
   plugin handle the rest.

### External Services

This plugin relies on the following external services to function:
 1. **ipapi.co**–
Used to detect the visitor’s country securely over HTTPS by resolving their IP address.
Their privacy policy is available at [https://ipapi.co/privacy/](https://ipapi.co/privacy/).
No personal data other than the user’s IP address and proxy headers is transmitted.
2. **flagcdn.com** – Used to deliver fast and reliable SVG/PNG country flag icons
inside the WordPress Admin Dashboard.

## 螢幕擷圖

 * [[
 * The **AffLoc admin page** featuring the **Add New Mapping** form (Offer Slug,
   Country search, Affiliate text and URL fields) alongside the sidebar with **White-
   label Shortcode (Pro)**, **Shortcode Helper**, and **Import / Export Mappings**
   tools.
 * [[
 * The **Existing Mappings** table — all mappings grouped by slug/project, showing
   country flags, destination URLs, ready-to-copy shortcodes with a “Copy Shortcode”
   button, creation date, and Edit/Delete row actions.
 * [[
 * Inserting the shortcode into a page using the WordPress block editor (Gutenberg)—
   add a standard **Shortcode** block and paste `[affloc_link slug="your-slug" text
   ="Buy Now"]`.
 * [[
 * The rendered result on the front end — a geo-localised **“Buy Now”** affiliate
   link automatically swapped to the correct regional URL based on the visitor’s
   country.

## 安裝方式

 1. Upload the plugin files to the `/wp-content/plugins/affloc` directory, or install
    the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Navigate to **AffLoc** in your WordPress admin menu.
 4. Add your first mapping (e.g., `slug: amazon`, `country: US`, `url: https://amazon.
    com/...`).
 5. Use the shortcode `[affloc_link slug="amazon" text="Buy Now"]` in your posts or
    pages.

## 常見問題集

### Does it work with caching plugins?

Yes! The substitution happens on the client side (in the browser), meaning your 
pages remain fully cacheable.

### Which IP geolocation service is used?

We use the free ipapi.co service with a secure HTTPS connection. The plugin also
caches the location in the user’s browser to minimize API calls and speed up link
swapping.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈AffLoc — Affiliate Link Localization〉的開發相關工作。

參與者

 *   [ AffLoc ](https://profiles.wordpress.org/affloc/)

[將〈AffLoc — Affiliate Link Localization〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/affloc)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/affloc/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/affloc/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/affloc/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/affloc/)。

## 變更記錄

#### 0.2.0

 * Features: Added maximum mapping limit and Affiliate Text shortcode support.
 * Refactoring: Conformed strictly to WordPress Database APIs for SQL queries.

#### 0.1.5

 * Enhancements: Added copy-to-clipboard functionality for shortcodes.
 * Enhancements: Admin UI improvements including country flags, grouping, searching,
   date sorting, and row actions.
 * Security: Switched to secure HTTPS endpoints for IP geolocation.
 * Security: Added comprehensive IP validation including support for Cloudflare/
   Proxies.
 * Performance: Frontend scripts now only load on pages containing the shortcode.

#### 0.1.0

 * Initial Beta release.

## 中繼資料

 *  版本 **0.2.0**
 *  最後更新 **4 天前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 6.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  語言
 * [English (US)](https://wordpress.org/plugins/affloc/)
 * 標籤
 * [affiliate](https://tw.wordpress.org/plugins/tags/affiliate/)[geotargeting](https://tw.wordpress.org/plugins/tags/geotargeting/)
   [links](https://tw.wordpress.org/plugins/tags/links/)[localization](https://tw.wordpress.org/plugins/tags/localization/)
   [redirects](https://tw.wordpress.org/plugins/tags/redirects/)
 *  [進階檢視](https://tw.wordpress.org/plugins/affloc/advanced/)

## 評分

這個項目尚無任何評論記錄。

[新增使用者評論](https://wordpress.org/support/plugin/affloc/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/affloc/reviews/)

## 參與者

 *   [ AffLoc ](https://profiles.wordpress.org/affloc/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/affloc/)