Offers by visitor country (geolocation)
Visitors from Austria or Switzerland see the offers of their country – with a preferred partner, fallback shops and a tracking ID of their own per country.
affilinode shows visitors the offers of their country: someone from Austria sees Austrian shops, prices and tracking IDs, even if the page is in German. The page language only determines the texts; the country comes from geolocation.
How the country is determined
- Geo header of the CDN or proxy (for example Cloudflare CF-IPCountry).
- Otherwise the MaxMind GeoLite2 country database.
- Otherwise the website's "Default country".
- Only as a last resort the browser language – only where there is no default country (for example short links).
A country is only used if it is listed under "Allowed countries" (empty = all) and you have added shops there – otherwise the default country applies, so nobody sees an empty box. The IP address is only looked up, never stored; only the country is passed on.
Country release of shops
A shop shows its offers only in the countries it is released for in the shop settings. If a shop is only active for Austria, visitors from Germany never see it – even if older offers from an earlier release are still stored. This applies everywhere: product boxes, lists, search, price history, short links, bio pages and the "best price" note only count the shops of the country. A shop without a country entry is treated as unrestricted.
If a visitor's country cannot be determined (no header, no database, internal network), the website's default country applies – so only shops released there appear. If there is no suitable shop in the country, the box stays empty instead of showing offers from another country.
Rules per website
- "Determine the visitor's country": off = always the default country.
- "Preferred partners": for example amazon. A partner only counts with an available offer and its own partner tag in the country; several entries apply one after the other (fallback order).
- "Shops taken into account": only these shops (shop type such as awin, or a shop ID); empty = all. Without a preferred partner in the country, the cheapest of them applies.
- "Exceptions per country": own shops or partners for individual countries, for example CH only with Swiss shops. Empty fields inherit the rules above.
Example: preferred is amazon, taken into account are amazon and awin. In Germany Amazon.de wins with your partner tag; in a country without an Amazon partner account, the cheapest Awin shop wins.
Override per box
- WordPress: shops="amazon,awin", prefer="amazon" and countries="DE,AT,CH" on the shortcode, for example [affilinode_product id="…" prefer="awin"].
- Embedding (Ghost, Discourse, HTML): data-shops and data-prefer on the script tag; data-country sets a fixed country.
- Public API: parameters shops and prefer.
Products in other countries
If a product has no offer in the visitor's country, affilinode searches for it automatically by ASIN, GTIN and MPN in the shops of that country (for Amazon per marketplace) and assigns clear matches. In addition, affilinode reconciles all shops and countries weekly. You can see and correct the offers per country on the product under "Offers".
Tracking IDs per country
Every Amazon marketplace is a shop of its own with its own partner tag (under "Tracking IDs" of the website). For Amazon, prices only come from the interface of the respective marketplace; affilinode never redirects with a foreign or missing tag.
Page caches
The WordPress plugin renders the box for the default country (good for SEO and cached pages) and swaps it in the browser for the offers of the visitor's country. Embedding asks for the country on every request and is never stored in shared caches. Incidentally, the product box and card show "Offers for Austria" with a switch.
This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.