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')
}JavaScriptSetup in GTM
Step 1: Create the Variable
- Go to Variables → New
- 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):
- Open the trigger (e.g., “Thank You Page View”)
- Change to “Some Page Views”
- Add condition:
{{JS - Is Page Reload}}equalsfalse
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:
- Submit a test form, land on thank you page → conversion fires ✓
- Hit F5 to reload
- Check variable value =
true - 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.

幼い女の子チュートリアル集