If first_time_accessed does not return true

Topic summary

Core issue: The Liquid variable first_time_accessed (intended to be true on a shopper’s first visit to the order status/thank_you page to prevent duplicate firing) intermittently resolves to false or an empty string, even on first load. Related: the {{ order }} object sometimes renders empty on initial load but appears after a refresh.

Key observations:

  • Multiple confirmations that first_time_accessed is blank/false in Settings > Checkout > Additional Scripts, breaking purchase tracking.
  • Some stores see a redirect sequence after checkout: /thank_you → /authenticate → final order status URL (without “thank_you”). Images and GTM Preview screenshots show missing dataLayer/gtag purchase events during these flows.
  • Console logging Liquid via JS can show empty output because Liquid renders server-side; rendering {{ first_time_accessed }} into HTML also shows empty for some.

Impact: Missed conversions in GA4/Ads and inflated/duplicated tracking when workarounds are used.

Workarounds reported:

  • Remove first_time_accessed and check for empty checkout object (causes overcounting).
  • Store Order ID in localStorage or set a JS flag and dedupe with a cookie; still not fully reliable.

Updates:

  • Some report GA4 missing transactions improved around mid-July via native integration, but first_time_accessed inconsistencies persist.

Status: Ongoing. Requests for an official Shopify fix/timeline; no resolution in-thread.

Summarized with AI on January 16. AI used: gpt-5.

Thanks for this! I have been searching for what is the problem for quite a while and this is very weird way of confirming the orders. This must be a recent change as it was not like this earlier of the year. My team decided we create a workaround by putting the Order ID into local storage. It mitigates the short term problem of customer going back to the thank you page again after a while. But this doesn’t solve the long term problem that the first_time_accessed code block is still wack.

And I do agree that native integration is kinda bad now. Our Meta CAPI via the integration option is now reporting upwards to 5 to 10 orders missing per day which affects our reporting. I’m still at a loss regrading this.