GA4 purchase fires again when the customer refreshes the thank-you page.
- “GA4 purchase fires again on thank you page refresh”
- “thank you page reload sends purchase again”
- “purchase event fires on page refresh GA4”
- “order confirmation page refresh duplicate conversion”
- “thank you page counting conversion on reload”
- “prevent purchase event firing on reload GTM”
- “GA4 duplicate purchase when customer revisits order page”
Baris Asa, tracking consultant, London · Last checked: 13 November 2026
Refreshing the thank-you page runs its tags again, so the purchase is sent again. GA4 and Google Ads drop the repeat only if it carries the sametransaction_id as the first send. Meta’s Pixel keeps it either way. So a refresh doubles GA4 when the ID is missing or changes on each load. The fix: send the order number as transaction_id, and make the page send the purchase on its first view only.
On file as F-101 . This note is the refresh case alone. If the doubles come from two tags, two triggers or an app sending its own purchase, that hunt is in GA4 purchase event fires twice.
What happens when the thank-you page is refreshed?
The browser loads the page again. Whatever the page prints for the purchase, usually a purchase push to the dataLayer, is printed again, and every tag waiting for it fires again. GTM’s “Once per page” firing option doesn’t help: it resets on every load.
What each platform does with the repeat is not the same.
| Load | Sent to | ID on the hit | Counted? |
|---|---|---|---|
| first | GA4 · purchase | 1042 | yes |
| refresh | GA4 · purchase | 1042 | no, same ID |
| refresh | Google Ads · purchase | 1042 | no, same ID |
| refresh | Meta Pixel · Purchase | eventID 1042 | yes, browser repeat kept |
Same refresh, three answers. GA4 and Google Ads drop it because the order number came back with it. Meta counts it, and no ID setting changes that.
Which revisits send it again?
- A refresh. The obvious one. Some buyers refresh while waiting for the confirmation email.
- The order link in the confirmation email, where that link points back at the same confirmation URL. Days later, often on another device.
- A restored tab or a bookmark. Reopening the browser reloads the page.
- The back button, sometimes. Browsers can restore a page from their back/forward cache, which resumes it without running its scripts again, so nothing fires. When the page isn’t eligible for that cache, it loads again and fires.
When does a refresh actually double the count?
| Platform | Drops a repeat when | Double counts when |
|---|---|---|
| GA4 | Same transaction_id (Google publishes no time window) | No ID, or an ID generated on each load |
| Google Ads | Same transaction ID, same conversion action | No ID, or the repeat goes to a second conversion action |
| Meta Pixel | Never for two browser events | Every refresh that fires Purchase |
The GA4 row is where most shops get caught. The tag sends a transaction_id, but the value is built in the browser: a random string, a timestamp, a checkout token the page reads fresh each time. Each load then sends a new ID, and GA4 keeps every one. An empty string is a different fault: Google says GA4 treats every purchase with an empty ID as one, and you undercount.
Meta’s row surprises people who have set up event_id. Meta matches event_id and event name between the Pixel and the Conversions API, within 48 hours. Its documentation says it doesn’t deduplicate events from one source alone, and keeps two consecutive browser events with the same information. A refreshed Pixel purchase is two browser events. The Pixel-and-server pairing is a separate fault, F-102 : Meta CAPI and Pixel double counting purchases.
How do I check whether refreshes double count?
One test order, about ten minutes.
- Open developer tools, go to the Network panel and tick Preserve log.
- Place the order. Note the order number.
- Refresh the thank-you page twice. Then open the order link from the confirmation email in a new tab, if it goes back to the same page.
- Count the purchase hits. GA4 requests contain
collect, each event’s name sits inenand the ID inep.transaction_id. The Pixel’s requests go tofacebook.com/trwithev=Purchase. The Google Ads conversion is its own request from the Ads tag.
Read the result:
- Repeats with the same order number on GA4 and Ads. Those two are safe. The Pixel is still counting each one.
- Repeats with a new ID each time, or no ID. GA4 is counting each one.
- Nothing on refresh at all. Either a guard is already in place or the page doesn’t print the purchase again. Check the email link before calling it done.
In GA4 itself, a refresh problem shows in the Transactions report as (not set) rows or IDs in a format your shop doesn’t use. The full report check is in GA4 purchase event fires twice.
How do I make the page send the purchase only once?
Three layers. The first is the real fix, the second covers what it can’t reach, the third is the backstop.
1. Flag the order on the server. The page prints the purchase push only on the first view of the order, then marks the order as sent. Every later view, from any device, prints the page without it. The two common WooCommerce plugins already work this way: GTM4WP and Google Analytics for WooCommerce both store an _ga_tracked flag on the order. On a custom build, a developer adds the same thing: a field on the order record, set when the confirmation page first renders the purchase.
2. Guard in the browser, keyed by the order number. Where you can’t touch the server, wrap the push in the site’s code:
// Thank-you page: push the purchase once per order, per browser
var orderId = '1042'; // printed by the server from the order
var key = 'purchase_sent_' + orderId;
var sent = false;
try { sent = localStorage.getItem(key) === '1'; } catch (e) {}
if (!sent) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ ecommerce: null });
window.dataLayer.push({
event: 'purchase',
ecommerce: { transaction_id: orderId, value: 59.90, currency: 'GBP', items: [] }
});
try { localStorage.setItem(key, '1'); } catch (e) {}
}
GTM4WP does the same in its own code, keeping the last tracked order number in localStorage, or a cookie where storage isn’t available. If only GTM is open to you, the GTM version of this guard, a cookie checked by an exception trigger, is in GA4 purchase event fires twice. Don’t use sessionStorage. MDN says a page opened in a new tab starts a new session, so the email link fires again. A browser guard also can’t see another device or cleared storage. That is why layer 1 comes first.
Put the guard on the push, not on the GA4 tag. Then the Pixel and the Google Ads tag, which fire on the same push, are covered too.
3. Send the order number as transaction_id anyway. Read it from the order, never generate it in the browser. If the guards miss a revisit, GA4 and Google Ads still drop it. Meta has no equivalent for the Pixel, which is why it needs layer 1 or 2.
On Shopify. Tags built on the checkout_completed event in a custom pixel or app are on safer ground: Shopify says that event fires once per checkout, on the Thank you page or on the first upsell page. A Shopify store that doubles purchases usually has a second sender. That hunt is in GA4 purchase event fires twice.
For the shape of the purchase push itself, see How to set up GA4 ecommerce tracking with GTM.
How do I know it’s fixed?
- One test order, refreshed twice and reopened from the email in a new tab, sends one GA4 purchase, one Pixel Purchase and one Google Ads conversion.
- The GA4 purchase carries the order number as
transaction_id, in the same format the shop admin shows. - From the fix date, no new
(not set)rows in the GA4 Transactions report. - A closed week of Meta purchases sits near the shop’s orders, not above it. Meta’s attribution rules differ from the shop’s, so expect a gap, not a match.
Past data stays as it is. Note the fix date and compare from the first full week after it.
Common questions
Why does my purchase event fire again when the thank-you page is refreshed?
A refresh loads the page again, so every tag that fires on page load, or on the purchase dataLayer push the page prints, runs again. Nothing in GA4, GTM or Meta knows the order was already sent unless you tell it: a matching transaction_id, a flag on the order, or a stored marker in the browser.
Does GA4 count the refreshed purchase twice?
Not if the repeat carries the same transaction_id as the first. Google says GA4 deduplicates purchases registered with the same transaction ID, and publishes no time window. It counts twice when the ID is missing, or when it changes on each load because it is generated in the browser instead of read from the order.
Does Google Ads count a refreshed confirmation page as a second conversion?
Google’s help names this case: a customer who reopens the confirmation page can fire the tag again. Send the order number as the transaction ID and Google Ads treats the second conversion for the same conversion action as a duplicate and doesn’t count it. Without an ID, it counts. The ID doesn’t stop duplicate view-through conversions.
Does Meta deduplicate a Pixel purchase that fires again on refresh?
No. Meta’s documentation says it doesn’t deduplicate events from one source alone, browser-only or server-only, and keeps two consecutive browser events with the same information. event_id and event name only match a Pixel event against a Conversions API event, within 48 hours. The Pixel purchase needs the fire-once guard.
Can I use sessionStorage to stop the purchase firing twice?
It stops a refresh in the same tab and little else. MDN says sessionStorage survives reloads but a page opened in a new tab or window starts a new session. An order link opened from the confirmation email lands in a new tab and fires again. Use localStorage or a cookie keyed by the order number, or better, a flag on the order on the server.
How do I test whether a refresh sends the purchase again?
Place a test order with the browser’s Network panel open and Preserve log ticked. Refresh the thank-you page twice, then open the order link from the confirmation email in a new tab. Count purchase events for GA4, the Pixel’s Purchase and the Google Ads conversion, and compare the transaction_id on each. One of each is the target.
Sources
Read on 13 November 2026:
- Google Analytics Help, minimise duplicate key events with transaction IDs (same transaction ID deduplicated, no window published, empty string, unique dynamic value per order, app streams through the Firebase SDK)
- Google Ads Help, use a transaction ID to minimise duplicate conversions (reopened confirmation page, same conversion action and transaction ID treated as a duplicate, transaction IDs not reported in Google Ads, no effect on duplicate view-through conversions)
- Meta for Developers, handling duplicate Pixel and Conversions API events (event ID and event name, 48 hours, no deduplication for browser-only or server-only, two consecutive browser events both kept)
- Shopify developer docs, checkout_completed (once per checkout, Thank you page or first upsell page)
- MDN, Window: sessionStorage (survives reloads; a new tab or window starts a new session)
- web.dev, back/forward cache (page restored with JavaScript resumed, not reloaded;
pageshowwithpersisted) - Plugin source code read on wordpress.org: GTM4WP 2.1.1 (
_ga_trackedorder meta,gtm4wp_orderid_trackedin localStorage or a cookie) and Google Analytics for WooCommerce 2.4.4 (_ga_trackedorder meta)