Quick Start: Your First Geo-Targeted Link in 2 Minutes

Follow these steps to create your first geo-localized affiliate link:

Step 1: Create a Link Mapping

  1. Navigate to AffLoc in your WordPress admin.
  2. In the Add New Mapping section, enter an Offer Slug (e.g., amazon-headphones).
  3. Select a Country (e.g., United States).
  4. Paste your Affiliate URL for that country.
  5. Click Save Mapping.

Step 2: Add More Countries

Repeat Step 1 with the same slug but different countries. For example:

  • amazon-headphonesUShttps://amazon.com/dp/B08...
  • amazon-headphonesGBhttps://amazon.co.uk/dp/B08...
  • amazon-headphonesDEhttps://amazon.de/dp/B08...
  • amazon-headphonesdefaulthttps://amazon.com/dp/B08... (fallback)

Important: Always add a default mapping. This is the fallback URL shown to visitors from countries you haven’t mapped.

Step 3: Insert the Shortcode

In any post or page, add the shortcode:

Buy Now

That’s it! When a visitor from the UK views your page, they’ll see a “Buy Now” link pointing to Amazon UK. A US visitor gets the US link. Everyone else gets the default.

Step 4: Test It

Visit your page on the front end. Since you’re likely on localhost or your own country, you’ll see the corresponding link. The geolocation is cached in the browser’s localStorage for 24 hours.