Sometimes your users country may not match your current country. In this case use this guide to find out why the wrong country was detected in our wp country selector plugin.
Step-by-step guide
-
- Launch Chrome DevTools
Windows / Linux: F12 or Ctrl + Shift + I
macOS: ⌥ Option + ⌘ Cmd + I -
Open your page in debug mode
Open your domain with the extra parameter ?country=debug into the address bar and press Enter:https://yourdomain.com?country=debug
-
View the JSON output
-
Switch to the Console tab.
-
Reload the page (
F5
orCtrl / ⌘ + R
). -
The plugin prints one formatted JSON object—the debugging data.
-
- Launch Chrome DevTools
-
Alternative method
In DevTools > Network, select the page request, then open the Preview or Response sub-tab to see the same JSON payload.
2 Field glossary (what each key tells you)
Key | Meaning |
---|---|
users_url |
The URL the visitor is currently on. |
users_country |
Two-letter ISO country code detected for the visitor. |
users_language |
Browser language of the visitor (e.g. de ). |
target_URL |
Destination URL the plugin would redirect to. |
force_redirect |
1 = immediate redirect, 0 = show modal first. |
force_redirect_seconds |
Delay (seconds) before redirect, if force_redirect = 1 . |
force_redirect_exclude_logged_in |
1 = logged-in users are never redirected. |
logged_in |
Indicates whether the current visitor is logged in. |
modal_header |
Text shown as the modal‟s headline. |
modal_text |
Body HTML of the modal (localised message). |
modal_buttons |
Full HTML for the “Go to country” and “Stay here” buttons. |
modal_countries |
Optional custom list of countries in the modal (blank = default list). |
show_popup |
1 = show modal, 0 = suppress modal. |
is_default |
true if this market configuration is the global fallback. |
3 Troubleshooting
Symptom | Likely cause | Fix |
---|---|---|
No JSON appears | Wrong URL or parameter cached | Clear the browser cache or use an incognito window; double-check ?country=debug is at the very end of the URL. |
Redirect fires before you can open DevTools | force_redirect = 1 without delay |
Temporarily set force_redirect to 0 in the plugin settings, or quickly hit Esc to stop the page, then open DevTools and reload. |
Output truncated or minimised | Chrome collapses long objects | Click the small ▶ triangle next to the object to expand it. |
Security / optimisation plugin strips the query string | Server-side caching or firewall | Add country=debug to the cache-exception list, or disable optimisation plugins briefly while testing. |
Tip: Once you have the raw JSON, you can copy it from the console and paste it into a JSON formatter (e.g. jsonlint.com) for prettier inspection or share it with your support team.