Keep the page path: deep links between your stores
By Beacon Wave Studio · · 7 min read
A shopper in Germany opens a link to a specific hat on your .com store, because that is the link a friend sent them. Your .de store sells the same hat. The best redirect in that situation is not to the .de homepage, where they would have to find the hat again, but to the same hat on the .de store. That is what the Keep the current page path checkbox on a GeoBeacon rule does, and because it is a one-line option with several consequences, this post spells out exactly how the destination URL is assembled, what is carried over, what is dropped, and when you should leave the box unticked.
Where the option lives
Open a rule and set Send them to Another website or store (URL). Two fields appear under it: Destination URL, and a checkbox labelled Keep the current page path, whose help text gives the example of sending /products/hat to https://example.de/products/hat instead of the homepage. The option does not appear for market rules, and there is a reason for that at the end. There is also an optional Store name shown in the popup; without one, the popup fills the {target} placeholder with the destination's host name, so a label such as "our German store" usually reads better.
How the URL is built
When a rule with a URL target matches, the storefront script starts from the destination URL exactly as you typed it, and with the box unticked that is also where it stops: every visitor goes to that URL, including any path and query string you put in it. With the box ticked, three more things happen.
- The current path is taken, minus the market prefix. If your store serves the shopper under a market or language root such as
/en-ca, the script removes that prefix first, so/en-ca/products/hatbecomes/products/hat. The destination store has its own prefixes, or none, and should not inherit yours. - It is appended to the destination's path. A trailing slash on the destination is trimmed so there is never a double slash.
https://example.deplus/products/hatgiveshttps://example.de/products/hat. If the destination URL already has a path, sayhttps://example.de/shop, the result ishttps://example.de/shop/products/hat, which is how you point at a store that lives under a sub-path or needs its own locale prefix. - The query string comes along, with one exception. Whatever follows the question mark on the current page is copied onto the destination. UTM tags, the click identifiers that the Google Ads post worries about, collection filters and sort parameters all survive. The single parameter that is removed is GeoBeacon's own
?geobeacon=XXtest parameter, so that a visit you simulated as German does not arrive on the German store still claiming to be a simulation and trigger whatever rules live there.
Two guards sit around all of this. If the destination URL cannot be parsed, the rule does nothing and the debug log reports a bad URL. And if the destination's host is the host the shopper is already on, the rule is treated as already there and nothing happens, which stops a mistyped rule from redirecting a store to itself in a loop.
What it does not do
The script never looks at the destination store. It does not know whether /products/hat exists there, whether the handle is hat or wool-hat-grey, or whether the collection you are on has a counterpart. It builds a URL and hands it to the browser. If the handle does not exist, the shopper sees the other store's not-found page, which is a worse outcome than landing on a homepage. So the option is right for stores built from the same catalogue, duplicates created by export and import, and regional storefronts that share a product feed, and wrong for a distributor, a marketplace listing or a partner site whose URLs you do not control. The distributor post covers that second case and recommends a dedicated landing page.
One query parameter deserves a warning even on matching stores. Shopify product pages carry ?variant= followed by a numeric variant ID, and variant IDs are specific to each store. The parameter is copied faithfully, but the other store will not recognise the number, so the shopper lands on the right product with that store's default variant selected rather than the size or colour the link pointed at. Collection pages with filter parameters have the same issue when the filter values differ between stores. Neither is fatal; both are worth knowing before you promise a perfect deep link.
Keep path and the other direction
If the German store also runs GeoBeacon, a shopper who arrives there from your .com store via this redirect must not be bounced back. The Behaviour page has a field called Your other store domains for exactly that: list each store's host on the other, and visitors whose referrer is one of your own stores are left alone. The referrer rule post explains the mechanics. Keep path makes the hop feel seamless; the known-hosts list makes sure it only happens once.
Popup mode and redirect mode
The assembled URL is used the same way in both modes. In popup mode it is where the accept button goes, and the popup's {target} placeholder shows your label or the host, never the full deep link, so a long product URL does not end up in a button. In redirect mode the browser is sent there immediately after the choice is remembered. In both cases the shopper's choice is stored for the remember period before the browser leaves, so a shopper who comes straight back is not asked again.
Why market rules do not have the option
A market rule changes the country, and sometimes the language, on the same store. GeoBeacon does that by submitting Shopify's own localization form, which takes a return-to address, and the script fills that with the current path and query string. Shopify then re-renders the same page in the new context. The shopper stays on the hat they were looking at, now priced in their currency, without any option needing to exist. Keep path is only a question when the destination is a different host, which is why the checkbox appears only for URL targets.
A checklist before ticking the box
- Open the same product on both stores and compare the handles in the address bar. Do this for a collection and a page as well.
- If the destination store uses a locale prefix, put it in the Destination URL, for example
https://example.de/de, and check that the prefix plus a product path resolves. - Give the rule a Store name so the popup reads "Go to our German store" rather than a host name.
- Add each store to the other's known hosts list.
- Test with the simulation parameter from a product page, and confirm that the address you land on has the product path, your UTM tags if any, and no geobeacon parameter.
That is the whole feature: one checkbox that turns a homepage redirect into a page-for-page one, provided both stores speak the same handles. When they do, it is the difference between a shopper who keeps browsing and one who has to start over.
Frequently asked questions
Does the Keep the current page path option carry the query string too?
Yes. Everything after the question mark on the current page is appended to the destination as well, so UTM parameters, Google click identifiers and similar tags survive the hop. The only parameter removed is GeoBeacon's own test parameter, so a simulated visit does not re-trigger a simulation on the other store.
What happens if the product does not exist on my other store?
The shopper lands on that store's not-found page, because GeoBeacon builds the URL from the current path and has no way to check the destination's catalogue. Keep path is for stores whose handles match, typically a duplicated store or an expansion store built from the same product export. For a distributor or marketplace, leave it off and send everyone to a landing page.
Why does the option not appear when my rule points at a market?
Market rules switch the country on the same store through Shopify's localization form, and that form returns the shopper to the page they were on by design. There is nothing to keep because nothing leaves the page. The option only exists for URL targets, where the destination is another host entirely.
Does Keep path work when my store uses language or market URL prefixes?
Yes. GeoBeacon strips the current market's root prefix, such as /en-ca, before appending the rest of the path, so the destination receives /products/hat rather than /en-ca/products/hat. If the destination store needs its own prefix, put it in the destination URL and the path is appended after it.