Stop Double Conversions from Page Reloads in GTM

11 Mar, 2026

When someone refreshes your thank you page, your conversion tags fire again. This inflates your numbers and wastes ad budget. Here’s a quick fix.

The Problem

User submits a form → lands on thank you page → conversion fires ✓

User hits refresh → conversion fires again ✗

Now you’ve got duplicate leads in Google Analytics, Facebook, and Google Ads.

The Solution

This JavaScript variable detects page reloads so you can block duplicate conversions.

Variable Name: Page Reload Detection

javascript

function(){
  return window.performance.getEntriesByType('navigation').map(function(nav){
    return nav.type
  }).includes('reload')
}
JavaScript

Setup in GTM

Step 1: Create the Variable

  • Go to VariablesNew
  • Choose Custom JavaScript
  • Paste the code above
  • Name it “JS – Is Page Reload”
  • Save

Step 2: Update Your Conversion Triggers

For any conversion tag (leads, purchases, sign-ups):

  1. Open the trigger (e.g., “Thank You Page View”)
  2. Change to “Some Page Views”
  3. Add condition: {{JS - Is Page Reload}} equals false

Done. Now your conversion tags only fire on the first visit, not on reloads.

How It Works

The script checks the browser’s navigation type:

  • navigate = Normal page load → Variable returns false → Tag fires ✓
  • reload = User hit refresh → Variable returns true → Tag blocked ✗

Testing

Use GTM Preview Mode:

  1. Submit a test form, land on thank you page → conversion fires ✓
  2. Hit F5 to reload
  3. Check variable value = true
  4. Conversion tag should NOT fire ✓

Where to Use This

Add this to any one-time conversion event:

  • Lead forms
  • Purchases
  • Sign-ups
  • Downloads
  • Bookings

Quick Notes

Browser Support: Works in all modern browsers.

Back Button: This only blocks reloads, not back/forward navigation.

Per Tag: You can choose which tags use this condition. Some tags (like page views) might be fine firing on reloads.

That’s it. Simple fix to stop counting phantom conversions from page refreshes.

Related Posts

Privacy Policy – GTM Params Injector

Last Updated: February 11, 2025Effective Date: February 11, 2025 TL;DR - The Short Version We collect ZERO data. GTM Params Injector works entirely in your browser. No tracking, no analytics, no servers, no data collection. Period. Introduction GTM Params Injector...

read more

1 Comment

Submit a Comment

Your email address will not be published. Required fields are marked *

Shibbir Ahmed

Hi, I’m here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey.
Book Meeting

Search Tags

Claim FREE Audit