Storefront tracking: recover the page a visitor arrived on
Settings > Store and customers > Storefront tracking holds the Landing page recovery setting. When it is on, Commander records the page a visitor arrived on, with its campaign tags and ad click IDs, even when the visitor accepts cookies only after that first page. The setting is not available for every store.
Problem and intended user
The ecommerce manager (the person who runs the store) and the media buyer (the person who runs your paid ads) want to know which ad brought a visitor. A visitor often lands from an ad, browses, and accepts cookies some pages later. By then the page they arrived on is gone from the visit. Without a record of that page, the visit cannot be tied to the ad that started it.
Current workflow
Without Commander, a merchant relies on the ad platform's own reports, the reports in Shopify or a web analytics tool. Someone then matches orders to campaigns by hand, from the campaign tags in the store's links.
Prerequisites
- Commander is installed on your Shopify store.
- The Storefront tracking item shows in Settings > Store and customers. The setting is not available for every store, and the menu shows the item only where it is available.
- Your store's privacy policy tells visitors about this tracking. See the warning below.
- The theme app embed Landing page recovery is on in your live theme. The page shows its status.
How Commander works
Commander has a tracking pixel in your store. It records the page that starts a visit, add-to-cart events and checkout steps, for visitors whose consent Shopify counts as given. Landing page recovery adds another record to that tracking. Fixed rules do all of it. AI writes nothing and decides nothing here.
When a visitor accepts cookies partway through a visit, the theme app embed looks in that browser tab's history for an earlier page. The embed picks the most recent earlier page of that tab that has campaign tags or ad click IDs. The embed does nothing when the current page already has them, because the pixel sees that page itself. The recovered page is not a landing page that you built in Commander. Commander records that page's address with its campaign tags and ad click IDs. It cuts other details from the address before it keeps it.
Before the visitor accepts analytics and marketing cookies, the embed reads no browser storage and no tab history, and the pixel sends no events. If a visitor withdraws consent, Commander stops sending.
The pixel copies only a fixed list of fields from a store event: the name of the event, its identifier, its time and its sequence number, the identifier that Shopify gives the visitor's browser, the page address, the referrer and, for checkout steps, the checkout token and the order id. It copies no name, email address, phone number or postal address.
The setting does nothing until the theme app embed is on in your theme. You turn on the setting in Commander and the embed in the Shopify theme editor.
WARNING
Your store's privacy policy must tell visitors about this tracking. Update it before you turn the setting on.
Turn on landing page recovery
- Select Settings > Store and customers > Storefront tracking. The page has a card titled Landing page recovery.
- Read the text under Recover the landing page after late consent.
- Select the switch next to it. A save bar appears with Save and Discard. The switch changes nothing until you select Save. While the change is unsaved, links that would leave the page stay locked.
- Select Save. A short Saved message confirms it. Select Discard to go back to the saved value.
- Read the status line under the switch. If it reads Theme app embed is off, so this setting does nothing yet, select Turn on in theme editor. The link opens your theme editor in a new tab.
- In the theme editor, turn on the app embed Landing page recovery from Commander, then save the theme.
- Return to the page. The status line reads On in your live theme once Commander sees the embed on in the live theme. Reload the page if the line has not changed.
Change or turn off the setting
Select the switch again, then Save. Turning the switch off stops new recovery records.
Exact output
You get a setting and a record. The setting is the Landing page recovery card. The record is the page address that Commander keeps for a visit.
The card has these parts:
| Part | What it shows |
|---|---|
| Recover the landing page after late consent | The name of the setting, with its switch. |
| Description | The text that says what Commander records. |
| Consent note | "Nothing is read or stored until the visitor accepts analytics and marketing cookies" |
| Limits note | "This works only while the theme app embed is on and only in browsers that support the Navigation API, so some visits are not recovered" |
| Status line | The state of the theme app embed in your live theme. See the table below. |
| Last changed line | Who changed the switch last and when. It reads "Last changed by" and a name, or "Last changed" with no name, then "on" a date and "at" a time. It shows after the first change. |
The status line has these states:
| Status line | Meaning | Link |
|---|---|---|
| On in your live theme | The theme app embed is on in your live theme. Recovery works when the switch is also on. | None |
| Theme app embed is off, so this setting does nothing yet | The embed is off in your live theme. | Turn on in theme editor |
| We couldn’t check your theme | Commander could not read the embed state. | Open theme editor |
The link opens in a new tab. It shows only when Commander can build it for your store.
What to do with it
| What you see | Decision or action | Owner |
|---|---|---|
| No Storefront tracking item in Settings | Nothing to do. The setting is not available for your store. | Ecommerce manager |
| The switch is off | Check your privacy policy first. Then turn the switch on and select Save. | Ecommerce manager |
| Theme app embed is off, so this setting does nothing yet | Select Turn on in theme editor, turn on the embed and save the theme. | Ecommerce manager |
| We couldn’t check your theme | Select Open theme editor and check that the embed is on. Reload the page later. | Ecommerce manager |
| On in your live theme, and the switch is on | Nothing more to set. Compare your ad campaigns later, as the next section says. | Media buyer |
| You no longer want the recovery | Turn the switch off and select Save. | Ecommerce manager |
Expected value and measurement
Landing page recovery can raise the number of visits that Commander ties to the campaign that started them. This helps most where many visitors accept cookies after the first page. Other changes at the same time, such as a new cookie banner, also change that number, so the effect cannot always be isolated.
This page shows no count of recovered visits. To check the effect, compare how many visits your Commander reports tie to a campaign before and after the day when both the switch and the theme app embed are on. Look at visits that start from tagged ad links.
Limitations and exceptions
- Not every store has it. Where the setting is not available, Settings has no Storefront tracking item. A visit to the page by its address sends you to Team.
- If it becomes unavailable while you edit. A save can fail with "This setting isn’t available for your store". The page can then send you to Team.
- Needs the theme app embed. The setting does nothing while the embed is off in your live theme.
- Browsers. Recovery needs a browser feature that not every browser has, as the limits note on the card says. The embed also reads only the history of the tab the visitor is in.
- Consent. Nothing is recovered for a visitor who never accepts analytics and marketing cookies.
- Checkout. A checkout page cannot show the theme app embed. Commander's tracking pixel covers checkout steps.
- Failed save. A failed save shows "We couldn’t save this setting. Try again." at the top of the card. The switch keeps your choice, and the saved value does not change. Select Save again, or Discard.
- Page does not load. The page shows Couldn’t load these settings with Try again.
- A page with no campaign tags. A recovered address with no campaign tag is not kept.
- Demo Mode. The setting is not available in Demo Mode, so the Storefront tracking item does not show there.