On this page
What this issue is
Many sites send a conversion event such as generate_lead or purchase when the thank-you (confirmation) page loads. That works once. The trouble is that a page load is not the same as a conversion. If the visitor refreshes the page, presses Back and Forward, reopens the tab, or opens the URL from a bookmark or a confirmation email, the page loads again and the tag fires again.
The result is duplicate conversions: one real person, several counted events. GA4 does deduplicate purchases that share the same transaction_id, but only in some cases. Other events, such as generate_lead, have no built-in deduplication, and ad platforms like Google Ads and Meta count what they receive unless you give them an order ID or event ID.
- Form submittedOne real lead
- Thank-you page loadsConversion tag fires (correct)
- Visitor refreshesTag fires again
- GA4 and ad platformsCount 2+ conversions
- Reports and biddingInflated numbers
The real conversion happens once, but the thank-you page tag fires on every load.
Why it costs you leads or sales
Duplicate conversions do not lose a lead directly. They make your data wrong, and wrong data leads to wrong decisions. Your cost per lead looks lower than it is. Smart Bidding in Google Ads and Meta's optimisation learn from the inflated signals and may favour traffic that refreshes a lot rather than traffic that converts. You may scale a campaign that is not really working, or report results to a client that cannot be matched to the CRM.
Example: in one week the CRM receives 100 real leads, but 28 visitors refresh or revisit the thank-you page, so GA4 reports 128.
How to check if your site has it
Compare totals
Compare GA4 conversions for the event with real leads or orders in your CRM or shop for the same dates. GA4 consistently higher points to duplicates.
Open GTM Preview or GA4 DebugView
Complete a test submission and watch the event arrive on the thank-you page. Use your own test data, not a real customer's.
Refresh the thank-you page
Press reload three times. If the event appears again each time, it is tied to the page view.
Try Back and direct URL
Navigate away and press Back, then paste the thank-you URL into a new tab. Note whether the event fires.
Look for repeats in GA4
In Reports, Engagement, Events, check the conversion event. In Explore, add Event name and Page location and look for sessions with several of the same event. For purchases, compare Transaction ID counts to see repeats.
How to fix it
There are three approaches. Use the first where you can, and add the others as a safety net. 1) Fire on the real action, such as the form's success event, not the page load. 2) Send a unique ID so platforms can deduplicate. 3) Stop the tag firing more than once per visitor or per order.
Change the trigger
Replace the 'Page View' trigger on the thank-you URL with a trigger for the real action, such as a Custom Event pushed by your form on success.
Or limit firing
If you must keep the page trigger, open the tag, go to Advanced Settings, Tag firing options and choose 'Once per page' only as a minimum. Reloads still count as new pages, so also add the cookie check below.
Add a cookie guard
Create a 1st-party cookie variable (for example lead_sent) and add a trigger exception, or a condition, so the tag fires only when the cookie is not set. Set the cookie from a Custom HTML tag fired after the conversion tag.
Preview and publish
Test in Preview mode: first load fires, refresh does not. Then publish.
Find where the event comes from
Check your form plugin's tracking settings, any GA4 plugin and GTM. A conversion can be sent by more than one of them.
Prefer the form success event
Use your form plugin's AJAX success event or its confirmation message, not a redirect to a separate thank-you page that sends the event on load. The exact option depends on the plugin.
Guard the thank-you page
If you keep a thank-you page, add the once-only script from the Custom code tab, or the GTM cookie guard.
Use customer events (Pixels)
In Settings, Customer events, use pixels that subscribe to checkout_completed instead of pasting code into the order status page. Shopify's pixel events are built to fire for the completed checkout.
Remove old snippets
If you have purchase code in the legacy additional scripts area, remove it or make sure it is not also running, so you do not double count.
Send the order ID
Make sure purchase events include the order ID as transaction_id.
Check the form settings
If the event is in the thank-you page's custom code (Page settings, Before </body> tag), move it to run on the form's success state instead, or add the once-only script.
Publish and retest
Publish the site and retest with a refresh.
Find the tracking code
Check the funnel step's tracking code (Settings, Tracking code) and the form's thank-you page for a conversion event.
Add the once-only guard
Wrap the event in the script from the Custom code tab, or use the form submission event instead of the page load.
Review Marketing integrations
Check Google Analytics settings and any custom code added under Settings, Custom code that runs on the thank-you page.
Limit custom code
Set the code to load on the thank-you page only and add the once-only guard.
Check where the code lives
Look in Settings, Advanced, Code Injection and in the form's Advanced settings, where a post-submit script can go.
Prefer form storage
Add the conversion code to the form's post-submit area, not to the whole site footer, and add the guard.
Fire on the action
Call gtag or push to the dataLayer inside the form's success handler.
Guard the thank-you page
Use the snippet below so a reload or revisit does not fire again.
Send a unique ID
For purchases, pass the order number as transaction_id. For leads, pass your own unique lead ID as a parameter and use it for deduplication in your CRM.
(function () {
var key = 'fg_conv_sent_generate_lead';
try {
if (localStorage.getItem(key)) return; // already counted
window.gtag('event', 'generate_lead', { form_id: 'contact' });
localStorage.setItem(key, String(Date.now()));
} catch (e) {
// storage blocked: fall back to firing once per page
window.gtag('event', 'generate_lead', { form_id: 'contact' });
}
})();gtag('event', 'purchase', {
transaction_id: 'ORDER-10482',
value: 99.00,
currency: 'USD',
items: [{ item_id: 'SKU-1', item_name: 'Example product', price: 99.00, quantity: 1 }]
});Before
- Event fires on every page load
- Refresh adds another conversion
- Direct visits to the URL count
- GA4 total is higher than the CRM
After
- Event fires on the real action
- Reloads are ignored
- Unique ID sent for deduplication
- GA4 total matches the CRM closely
How to confirm it's fixed
- Submit a test lead: the event fires exactly once
- Refresh the thank-you page three times: no new event
- Press Back then Forward: no new event
- Open the thank-you URL directly in a new private window without submitting: no conversion
- GA4 DebugView shows one event per test lead
- After a few days, GA4 totals sit close to CRM or order counts
How to prevent it happening again
- Trigger conversions on the action, not the page view
- Always send transaction_id on purchases
- Reconcile analytics against CRM or orders monthly
- Re-test refresh and Back after changing themes, plugins or GTM containers
- Keep one owner for each conversion event so two tools do not both send it
How FunnelGuard handles this
FunnelGuard detects this issue only partly. On each scheduled run, the robot visitor completes your journey and counts how many times the conversion hit is sent during that run. If the same conversion fires more than once in a single pass, you get an alert with a screenshot and a likely cause.
What it does not check is a reload: it does not refresh the thank-you page or revisit it later, so a tag that only repeats on refresh, Back or a bookmark visit can go unnoticed. Cover that by hand: after any change, run the refresh, Back and direct-URL tests above, and compare GA4 totals against your CRM or orders each month.
Questions people ask
Why is my GA4 conversion counted twice when someone refreshes the thank-you page?
Because the event is attached to the page view, not to the action. Each reload loads the page again, so the tag fires again. Move the trigger to the form success event or add a once-only guard.
Does GA4 deduplicate conversions automatically?
Only in limited cases. GA4 can ignore repeated purchase events that share the same transaction_id, but events like generate_lead have no built-in deduplication. Ad platforms also need their own order or event IDs.
How do I stop a GTM tag firing on every page reload?
Trigger the tag on a custom event from the form's success, not on the thank-you page view. If you must use the page, set a first-party cookie after the tag fires and add a condition so the tag runs only when that cookie is absent.
How can I tell if my thank-you page is inflating conversions?
Refresh the page in GTM Preview or GA4 DebugView and see if the event repeats. Then compare GA4 conversions with real leads or orders in your CRM or shop. A consistently higher GA4 count is the usual sign.
Should I use transaction_id for leads too?
transaction_id is meant for purchases. For leads, send your own unique lead ID as an event parameter and use it to deduplicate in your CRM or when importing offline conversions.
Can people trigger conversions by opening the thank-you URL directly?
Yes, if the tag fires on page load. Anyone with the link, including from a bookmark or an email, can count as a conversion. Firing on the action closes this gap.
Does FunnelGuard detect conversions firing on refresh?
Only partly. It counts how many times the conversion fires during each run, so a double fire in one pass is caught. It does not reload the page, so refresh-only duplicates need a manual test.
Related issues
- TRK-043generate_lead not sent on form submitFix guide
- TRK-044generate_lead fires on page load instead of submitFix guide
- TRK-045Lead event fires on submit click even when validation failsFix guide
- TRK-047Event name typo (Generate_Lead vs generate_lead)Fix guide
- TRK-056value sent without currency parameterFix guide
- TRK-059value of 0 on paid conversionFix guide