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.