What GeoBeacon loads on your storefront: a network audit
By Beacon Wave Studio · · 7 min read
On 4 November Shopify opened a feature preview for development stores that checks an app's declared network access: it shows the exit warning for links to hosts the app has not declared, and logs a console warning when a storefront page loads from or sends a request to a server the app has not listed. The declarations themselves live in a [network_access] section of the app's configuration, introduced a few weeks earlier. The intent is plain enough. Shopify wants to know which outside servers each app talks to from a shopper's browser, so it can spot the ones that should not be talking at all.
A geolocation app is a fair thing to be suspicious of. It runs on every page, it knows something about where the visitor is, and the category has a history of scripts that phone home more than they need to. So this post does the audit for GeoBeacon: every request its storefront code makes, where each one goes, what the new Shopify declarations mean for it, and how to check the same thing on your own store in a couple of minutes.
What Shopify is asking apps to declare
The network access section has two lists. allowed_navigation_hosts holds the external sites an app links shoppers to from the storefront, up to twenty hosts, and Shopify skips its exit warning for those. Shopify says to list only hosts the app controls, such as the app's own domain. allowed_sources holds up to twenty HTTPS origins that the app's code loads from or sends requests to on storefront, checkout and admin pages, and Shopify uses the list to watch for requests that do not belong. The documentation adds two exclusions that matter here: leave out anything Shopify serves, including the files in a theme app extension's assets folder, and leave out the app proxy, because the store serves those pages from its own domain.
The 4 November changelog entry adds the testing side. A dev store created with the network access testing preview warns, in the console, whenever a page contacts a server outside the declared list, and shows the exit warning on undeclared navigation. It only warns; nothing is blocked. The recommendation is for every app to configure both lists, both to remove warnings for trusted journeys and to help Shopify spot suspicious activity.
Every request GeoBeacon makes, in order
The storefront side of GeoBeacon is a theme app extension: one app embed block, one script, one stylesheet. Here is what happens when a page loads with it enabled.
- The rules arrive with the page. The block reads your configuration from an app-data metafield and writes it into the HTML as a JSON block, alongside the current localization and path. No request is made to fetch rules; they are part of the page Shopify rendered.
- Two assets load from Shopify's CDN.
geobeacon.js, deferred, andgeobeacon.css. Both are files in the extension's assets folder and both are served by Shopify, which is why the documentation says not to list them. They are the only script and stylesheet the app adds. - One same-origin request for the country. The script calls your store's own
browsing_context_suggestions.jsonendpoint, the one Shopify uses to suggest a country and language, with same-origin credentials and nothing else. Shopify works out the country from the request it already received. The visitor's address never travels to a third party, and GeoBeacon has no IP database of its own to consult. The country not detected post covers what happens when that endpoint returns nothing useful. - A decision, locally. The script compares the detected country to your rules, checks the excluded paths, the referrer, the bot flag from the user agent, and whether the shopper has already answered, and either does nothing, shows the popup, or redirects. All of that is arithmetic in the browser.
- A note in storage. If the shopper answers the popup or is redirected, the choice is written to the browser's local storage (session storage if that is not available) so the question is not asked twice. It stays on the device; the remembering post covers how long.
- The redirect, if there is one. A market target posts to Shopify's own localization form, which stays on your domain. A URL target navigates the browser to the address you typed in the rule. That navigation is the only moment the visitor leaves your store, and it goes to your destination, not to ours.
That is the complete list. There is no analytics ping, no error reporter, no font, no image, no call to beaconwavestudio.com. The console logging the app does for debugging stays in the console.
What that means for the declarations
Put the list above against Shopify's two properties and both come out empty, for different reasons.
allowed_sources is for servers the app's code contacts from the shopper's browser. GeoBeacon's storefront code contacts one server: the store itself. The two assets are Shopify-served and excluded by the documentation. So the storefront has nothing to declare, and an empty list here is the accurate description rather than an omission. On a dev store with the testing preview, the console should stay quiet on every page.
allowed_navigation_hosts is for hosts the app links shoppers to and that the app controls. GeoBeacon links shoppers to wherever your URL rules point, which is your other store, your distributor, your regional domain. Those are your hosts, not ours, and declaring them in our configuration would be wrong on Shopify's own terms. Whether a shopper sees a warning before landing there is governed by Shopify's storefront behaviour, which the redirect confirmation post covered when it changed in October: as of the 23rd, Shopify only blocks sites it has identified as malicious and asks for confirmation on suspicious ones, so an ordinary redirect to a domain you own goes straight through. If you want belt and braces, connect the destination domain to the store or add it as a trusted domain in Online Store preferences.
Why this is worth checking for any app
The reason Shopify built the preview is that merchants cannot easily see what runs on their own storefront. Every app embed and every script tag is a request someone else decided to make from your visitor's browser, and the consequences land on you: a cookie banner that has to disclose it, a privacy policy that has to name it, a page that waits on it. For a geolocation app the privacy question is sharper than usual because the whole point is to learn where the visitor is. The honest design is the one where the app learns that from Shopify, which already knows, rather than by shipping the visitor's address to a lookup service.
There is a performance side too. A request to a third-party geolocation API is a DNS lookup, a connection and a round trip before the popup can decide whether to appear, and it happens on every first visit. A same-origin request reuses the connection the page already has. The interstitial and LCP post goes into how the popup is timed so it does not become the largest element on the page.
The two-minute check on your own store
- Open your storefront in a private window and open the browser's developer tools on the Network tab before the page loads.
- Filter by
geobeacon. You should see exactly two entries, the script and the stylesheet, both from Shopify's CDN host. - Clear the filter and search for
browsing_context. One request, to your own domain, with a JSON response that includes a detected country code. - Filter by
beaconwave. Nothing. If anything shows up here, it did not come from GeoBeacon's storefront code, and we would like to hear about it. - If you run a development store, create one with the network access testing preview, install the app, and browse a few pages with the console open. A geolocation app that is doing only what it needs to produces no warnings.
The same five steps work for every other app on the page, and the results are often instructive. The cookie banner post explains what GeoBeacon stores and why it does not need consent under the usual readings of the rules; the audit above is the technical half of that argument.
Install GeoBeacon and run the check yourself; it is free to start and the Network tab does not lie.
Frequently asked questions
Does GeoBeacon send my visitors' IP addresses to its own servers?
No. The storefront script asks Shopify's own same-origin browsing context endpoint which country the visitor appears to be in, and Shopify answers from the request it already received. Nothing about the visitor is sent to GeoBeacon's servers from the storefront, and the app has no analytics beacon of its own.
Why does GeoBeacon have no allowed_sources in its configuration?
Because the storefront code contacts no external server. The script and stylesheet are theme app extension assets that Shopify serves, which Shopify says not to list, the rules come from a metafield rendered into the page, and the only request is to the store's own domain. There is nothing to declare.
Will my URL redirects show Shopify's exit warning now?
Since 23 October Shopify only blocks sites it has identified as malicious and asks for confirmation on suspicious ones, so an ordinary redirect to your other store goes straight through. GeoBeacon cannot declare your domains as navigation hosts, because that list is for hosts the app itself controls.
How can I verify this myself?
Open your storefront with the browser's Network panel filtered to your own domain and to anything that is not Shopify. You will see geobeacon.js and geobeacon.css from the Shopify CDN and one same-origin request to browsing_context_suggestions.json, and nothing to beaconwavestudio.com.