GeoBeacon console log: every skip and decision reason
By Beacon Wave Studio · · 7 min read
The popup did not show. Or it showed to the wrong person. Or it showed once and then never again. Every one of those complaints has a one-word answer, and GeoBeacon will tell you the word if you ask. The theme editor has a checkbox called Log decisions to the browser console, and with it on, the storefront script prints one line per page view saying what it did and why. We have mentioned the log in passing before. This post is the reference: every reason the script can print, in the order it checks them, with the setting or fact behind each one.
Switching the log on and reading it
Open the theme editor, go to App embeds, expand GeoBeacon and tick Log decisions to the browser console, then save. On the storefront, open the developer tools (F12 on Windows, Option-Command-I on a Mac) and choose the Console tab. Reload the page. Every line GeoBeacon writes starts with [GeoBeacon], so typing that into the console filter hides everything else. You will see one of two shapes:
[GeoBeacon] skipped: <reason>, meaning the script stopped before it even asked where the visitor is.[GeoBeacon] decisionfollowed by an object, meaning the script knew the country and worked out what to do about it. The object has anactionfield, and when the action isnone, areasonfield.
The two lists below cover every value those fields can take. The skip reasons come first because the script checks them first, and in this order; the first one that applies wins, and the rest are never evaluated.
The nine skip reasons
| Reason | What it means | What to do |
|---|---|---|
| unsupported-config | The configuration the embed received is missing or in a format this version of the script does not understand. | Open the Rules page in the app and save once; it rewrites the document. If it persists, reinstall the app embed. |
| disabled | The GeoBeacon is on switch on the Behaviour page is off. | Turn it on. This is the pause switch, nothing is lost. |
| design-mode | You are looking at the theme editor and the editor preview setting is off, so the script stays quiet while you design. | Expected. Tick the preview setting in the embed if you want to see the popup inside the editor. |
| bot | Skip crawlers is on and the browser identifies itself as a crawler, or it is an automated browser (navigator.webdriver). | Expected for Googlebot, Lighthouse and automated tests. A real browser should never print this. |
| opt-out | The URL contains ?geobeacon=off, which switches the script off for that page view. | Expected. Remove the parameter. Useful for sharing links with colleagues who should not be redirected. |
| remembered | This browser already answered the popup, or was redirected automatically, within the remember period. | Test with ?geobeacon=XX (a country code), which ignores the memory and does not write a new one, or clear site data. |
| excluded-path | The page is on the built-in exclusion list (checkout, cart, account, apps, tools, password, challenge) or on your own list. | Expected on those pages. Check Excluded paths on the Behaviour page if a normal page prints this. |
| came-from-own-store | The visitor arrived from one of your other storefronts, so they have already chosen and should not be bounced back. | Expected. The list of your own hosts is built from your markets and rule targets. |
| no-rules | There is not a single rule configured. | Add a rule on the Rules page. |
If none of the nine applies, the script finds out where the visitor is. It reads Shopify's browsing context suggestion for the visitor, which returns a country and, when Shopify can tell, a language, and it caches the answer in the tab for six hours so the lookup happens once per session rather than once per page. With ?geobeacon=XX in the URL the lookup is skipped and XX is used as the detected country, which is the whole trick behind testing without a VPN.
The five decision reasons
A decision line always has an action. market means the visitor will be offered, or sent to, another market of this store; url means another website; none means nothing happens, and the reason says why.
| Reason | What it means | What to do |
|---|---|---|
| undetected | Shopify did not report a country for this visitor. | Rare on a live store, common on preview and password pages. Force a country with ?geobeacon=XX to test the rules anyway. |
| no-matching-rule | The detected country is not listed in any rule, and no catch-all rule exists. | Expected for countries you do not redirect. Rules are matched top to bottom, so check the order if a country should have hit one. |
| country-not-offered | The rule points at a market country that your store does not currently sell to, so there is nowhere to send the visitor. | Add the country to a market in Shopify, or change the rule target to a URL. |
| already-there | The visitor is already browsing the target country, and either the rule names no language or they already have that language. | Expected. If you wanted a language switch, the destination market must offer that language, otherwise it is dropped. |
| bad-url | A URL rule's address could not be parsed. | Fix the URL on the Rules page. It needs the scheme, so https://... rather than a bare domain. |
When the action is market or url the object also tells you the target country, the language that will be switched (or null when the visitor already has it), the label from the rule and the rule itself. In popup mode the next thing on screen is the popup. In redirect mode the browser leaves immediately, so to read the decision line you need the console's Preserve log option switched on, or you will be reading the console of the destination page instead.
A reading order for the common complaints
- Nothing shows for anyone. Look for a skip line. disabled, no-rules and unsupported-config are the usual three, and each has a one-step fix above. No line at all means the embed is not on, which the redirect-not-working checklist covers.
- It showed once and never again. remembered. That is the feature working. Use the country parameter to test.
- It shows to visitors who are already in the right place. You will see a market decision rather than already-there, which means the rule target and the visitor's current country differ in a way you did not expect, often a language set on the rule that the visitor does not have.
- It does not show for one specific country. no-matching-rule or country-not-offered. The first is a rules problem, the second is a Shopify Markets problem.
The log exists so that the answer to why is a word you can read rather than a theory you have to test. Shopify's own guidance on markets explains which countries a storefront can serve, and that list is what country-not-offered is checking against; see Shopify Markets in the Help Center. Everything else in the two tables is decided by settings you can reach from the app or the theme editor, and once the question is answered, untick the checkbox and the console goes quiet again.
Frequently asked questions
Is it safe to leave the console log switched on in a live store?
Yes, with one caveat. The lines go only to the browser console, which shoppers never open, and they contain no personal data beyond the detected country code. The caveat is tidiness: every page view writes a line, so turn it off once you have your answer to keep the console clean for the next person debugging the theme.
Why do I see skipped: remembered when I never clicked the popup?
Somebody using that browser did, or the choice was saved during an earlier test. The remembered choice lives in the browser's own storage for the remember period you set, so it survives reloads and tab closes. Add ?geobeacon=XX with a country code to the URL to bypass it for one page view, or clear site data for your store to start fresh.
What does decision with action none and no reason mean?
It should not happen; every none decision carries one of the five reasons. If you see a decision line with no reason at all, you are probably reading an older copy of the script cached by the browser. Hard-reload the page, and if the line still looks wrong, write to us with the exact output and the store domain.
Where does the detected country come from, and can the log show me a wrong one?
From Shopify's own browsing context suggestion for the visitor, which GeoBeacon reads once and caches in the tab for six hours. The log shows what Shopify reported. A VPN, a corporate proxy or a mobile carrier routing traffic through another country can all make that country different from where the person is sitting, and the log will faithfully show the routed country.