What is gtm-msr.appspot.com?
The domain gtm-msr.appspot.com is owned by Google Tag Manager (GTM). It appears when:
You or your team enter Preview Mode in GTM.
Google runs automated scans or security checks on your container.
A tool or browser extension triggers a GTM render for testing/debugging.
This domain does not reflect real user traffic, but it can cause your tags to fire unintentionally, leading to:
False pageviews
Phantom conversions
Polluted analytics reports
Why It’s a Problem
If your GTM tags fire while loaded from gtm-msr.appspot.com, they may:
Trigger pixels (TikTok, Meta, Google Ads…) with fake hits
Inflate events or conversions in GA4, Meta Ads Manager, or other platforms
Break attribution accuracy
How to Prevent Tags from Firing on gtm-msr.appspot.com
To ensure no tag fires when GTM is loaded from this domain, follow this method:
Step 1: Create a Blocking Variable
Go to Variables in Google Tag Manager.
Click New → choose Custom JavaScript Variable.
Name it: IsNotGTMAppspot
Use this code:
function() {
return location.hostname !== "gtm-msr.appspot.com";
}
5. Save
Step 2: Add the Condition to All Triggers
For every trigger that launches tags (pageviews, clicks, events, etc.):
Open the trigger.
Add this condition:
IsNotGTMAppspot equals true
This tells GTM: “Only fire if the current hostname is not gtm-msr.appspot.com.”
(Optional) Extra Safety for Custom HTML Tags
If you’re using Custom HTML tags, wrap the code inside this condition:
<script>
if (location.hostname !== 'gtm-msr.appspot.com') {
// your pixel code here
}
</script>
How to Test It
Click Preview in GTM.
Confirm the URL becomes gtm-msr.appspot.com.
Check that no tags are fired during the preview.
If everything looks good, publish your container.
Problem | Solution |
Tags firing from gtm-msr.appspot.com | Create a custom variable + add it as a blocking condition in all triggers |
False hits in analytics | Filter by hostname or use conditional logic to restrict execution |
Clean data = better decisions | ✅ Stop pixel spam at the source |