Styling a geolocation popup in Shopify's theme editor

There is a question that comes up in nearly every geolocation popup support thread, phrased a dozen ways: where do I change how it looks? The answer for GeoBeacon is in two places on purpose, and the split follows a simple rule. Anything about what the popup does, which country triggers it, where it sends people, what the buttons say, lives in the app. Anything about how it looks on your storefront lives in Shopify's theme editor, next to the rest of your theme's appearance, where you can see the result while you adjust it. This post walks through the theme editor side setting by setting, explains what each one actually changes in the rendered popup, and covers the two settings that are not about looks at all: the editor preview and the debug log.

Why the appearance settings are in the theme editor

GeoBeacon's storefront part is an app embed, the mechanism Shopify provides for apps to add to a theme without editing its files. An app embed can expose settings, and those settings appear in the theme editor under App embeds, the way a theme section's settings do. Putting colours and radius there rather than in the app has three consequences that matter. The values are stored with the theme, so a seasonal theme and your main theme can style the popup differently. You see changes live in the editor's preview pane instead of saving in one tab and refreshing another. And turning the embed off in the theme editor removes the script from the storefront entirely, which is why uninstalling GeoBeacon leaves nothing behind.

To get there: Online Store, Themes, Customize, then the app embeds icon at the bottom of the left-hand panel. GeoBeacon is listed with a toggle and a disclosure arrow; the settings are behind the arrow.

The appearance settings, one by one

Background and Text are the card's surface and its copy, white and near-black by default. The card is the only surface, so a dark background with light text gives you a dark popup with no other changes. Button and Button text colour the primary action, the button that takes the shopper to the suggested store or market. The secondary button, the one that keeps them where they are, is drawn as an outline in the text colour so that it reads as the quieter choice without needing its own settings. The close cross in the corner also uses the text colour.

Corner radius runs from 0 to 32 pixels in steps of two, 12 by default. It rounds the card, and the buttons take a slightly tighter radius derived from the same value so that a square card gets square buttons and a pill-shaped card gets softly rounded ones, rather than the two fighting. If your theme uses sharp corners everywhere, set this to 0 and the popup stops looking like a visitor from another design system.

Backdrop darkness, 0 to 80 percent in steps of five, 40 by default, controls the dim layer behind the card. It only applies when the popup's position is centre. The top and bottom bar positions have no backdrop at all, because a bar is meant to let the shopper carry on reading while it waits; a dimmed page would defeat the point. If you have set the position to a bar in the app and the backdrop slider seems to do nothing, that is why. Note also that clicking the backdrop dismisses the popup and counts as the shopper choosing to stay, the same as pressing Escape or the cross, and that choice is remembered for the period described in how long GeoBeacon remembers a shopper's country choice. A very dark backdrop invites a reflexive click to get rid of it, which then silences the popup for that shopper; around the default is a reasonable compromise.

Show country flag adds the flag of the suggested country above the heading. It is the one setting worth thinking twice about. The flag is an emoji assembled from the country's two-letter code, which means it renders with whatever emoji font the shopper's device has. On Mac, iPhone, Android and most Linux desktops that is a flag. On Windows it is two letters, because Windows has never shipped flag emoji, so a shopper in Chicago on a work laptop sees a large "US" where you expected stars and stripes. If the rule that fired is a redirect to a URL rather than to a country market, there is no single country to show and the popup falls back to a globe. Stores with a mostly mobile audience keep the flag on; stores selling to offices often turn it off.

What is not a theme setting, and why

The popup's position, centre, top bar or bottom bar, is set in the app under Behaviour, alongside the rules. It affects how the popup behaves, not just how it looks: a centred popup is a modal dialog that takes focus, while a bar is not, and on phones a centred popup slides up as a bottom sheet so a thumb can reach the buttons. Those are behavioural choices with accessibility consequences, which is why they sit with the rules rather than the colours; the trade-offs are in geolocation popups, Google's interstitial rules and page speed.

The wording is also in the app, under Popup texts. A theme editor field would be convenient, but it would also mean the copy lives in each theme separately and silently reverts when you switch themes. The texts you write there are inserted as plain text, never as markup, so an apostrophe or an ampersand in a market name cannot break the card. The font is not a setting anywhere: the popup inherits the font of the page it sits on, so it matches your theme without a dropdown. For wording that converts, see geolocation popup copy examples.

Two things the popup does regardless of any setting. If the shopper's operating system asks for reduced motion, the slide and fade animations are disabled and the card simply appears. And the card has a maximum width, about 420 pixels when centred and wider as a bar, so a huge monitor does not get a huge popup; it gets the same card, centred.

The editor preview

The first checkbox in the settings, Preview popup in theme editor, is on by default and is the reason the other settings are usable at all. Without it, you would be adjusting the colour of something you cannot see, because on a real visit the popup only appears when a rule matches, and the theme editor's preview pane is loaded from wherever you are sitting. With it on, whenever the storefront script detects that it is running inside the theme editor, it renders a sample popup for an example country and stops. Your saved texts are used, with defaults for any you left blank; the position is the one chosen in the app; the colours and radius are the ones you are dragging. Nothing else runs: no country lookup, no rule evaluation, no redirect, and no remembered choice written to the browser, so previewing never affects what you see later on the live site.

Shoppers never see the sample. The script only takes this branch inside Shopify's design mode, and the checkbox has no effect on the live storefront in either state. Once you are happy with the look you can leave it on; it costs nothing. Turn it off only if the sample card gets in the way while you edit other parts of the theme.

The debug log

The last checkbox, Log decisions to the browser console, is for the moment when the popup does not appear and you want to know why without guessing. With it on, the script writes a line to the browser's developer console on every page explaining what it decided: that it matched a rule and which one, or that it skipped, and the reason for the skip. The reasons are the ones listed in the redirect-not-working checklist: the shopper is already in the target country, the visit came from one of your own domains, the page is excluded, the choice is remembered, Shopify did not report a country, or the visitor looks like a crawler. The log is plain text in the console and is invisible to shoppers who do not open developer tools, so it is safe to leave on while you investigate, but it is a diagnostic, and the tidy thing is to turn it off once the question is answered.

A sensible starting point

  1. Leave the preview on, open the theme editor, and pick the background, text and button colours from your theme's palette; the editor's colour picker accepts the same hex values your theme settings show.
  2. Match the corner radius to your buttons: 0 for a sharp theme, 8 to 12 for most, 24 or more if your theme uses pills.
  3. Decide on the flag based on your audience's devices; when in doubt, check what share of your traffic is Windows desktop in your analytics.
  4. Keep the backdrop near the default, and remember it does nothing for bar positions.
  5. Save, then open the live storefront from a location that matches a rule, or follow the VPN-free testing method, to see the real popup once before you call it done.

None of this takes more than a few minutes, and most of it you will set once. The point of putting it in the theme editor is that when you do come back, after a redesign or a new theme, the controls are where the rest of your storefront's appearance already is. GeoBeacon keeps the rules and the words in the app, and leaves the looks to the theme. Learn more at the GeoBeacon homepage.

Frequently asked questions

Why does the popup look different in the theme editor than on the live store?

In the theme editor the app shows a sample popup for a fixed example country so you can see your colours, radius and backdrop without matching a rule. Its text comes from the texts saved in the app, with defaults filled in for anything blank, and the position comes from the app's behaviour settings. The live popup uses the same styling but the real country and rule, so wording that depends on the country, such as the market name, will differ.

Can I change the popup's font or wording from the theme editor?

The wording is edited in the app under Popup texts, not in the theme editor, so that it stays in one place across theme changes. The font is not a setting at all: the popup inherits the font of the page it appears on, so it already matches your theme, and switching themes switches the popup's font with it.

Why does the country flag show as two letters on some computers?

The flag is an emoji built from the country's two-letter code, and Windows does not ship flag emoji, so Windows browsers render the two regional-indicator letters instead of a flag. Mac, iOS, Android and Linux show the flag. If a lot of your shoppers are on Windows desktops, turning the flag off gives a more consistent popup.

Does the theme editor preview run the real detection or record a choice?

No. In design mode the script renders the sample card and stops. It does not look up the shopper's country, does not evaluate your rules, does not redirect and does not save a remembered choice, so previewing in the editor never affects what you see later on the live storefront.