Google Tag Scanner Warnings: Why They're Wrong About Pixel Manager's gtag.js Placement

If you've recently checked Google's Tag Coverage Report, you may have seen warnings about your gtag.js implementation:
- "Tag not placed correctly"
- "Tag loaded too late"
- "Tag not found in the
<head>section" - "Certain pages are not tagged"
If you're using Pixel Manager for WooCommerce in its default configuration, these warnings are misleading and incorrect. Here's why.
The Root Cause: Google's Scanner Has Limitations
Google's Tag Coverage scanner primarily analyzes the static HTML source code of your pages. It looks for the gtag.js script tag directly in the HTML and checks whether it appears in the <head> section.
The problem? Pixel Manager (and many modern tracking solutions) inject gtag.js dynamically via JavaScript during the page load. This is a 100% valid and technically correct implementation method, but Google's scanner doesn't always recognize it properly.
Why Dynamic Injection is Valid
Dynamic script injection is widely used across the web for good reasons:
- Consent Management Compliance - Scripts can be loaded only after user consent
- Performance Optimization - Critical content loads first, tracking scripts load asynchronously
- Flexibility - Scripts can be conditionally loaded based on user behavior or settings
- Modern Web Standards - JavaScript-based injection is a common pattern in modern web development
Google's own Tag Manager (GTM) works the exact same way—it injects tracking scripts dynamically through JavaScript. Yet Google's scanner sometimes flags implementations that use this approach.
How Pixel Manager Loads gtag.js (By the Book)
Let's clarify exactly how Pixel Manager works in its default configuration:
1. Pixel Manager Loads in the <head> Section
The Pixel Manager script itself is loaded with high priority directly in the <head> section of your WordPress site, before most other scripts.
<head>
<!- Pixel Manager loads here, early in the head ->
<script id="pmw-head" src="...pixel-manager.js"></script>
...
</head>
2. gtag.js is Injected Dynamically in the <head>
Once Pixel Manager executes, it immediately injects the gtag.js script into the same <head> section where it was loaded. This happens before the DOM finishes loading, ensuring gtag.js is available as early as possible.
// Pixel Manager dynamically creates this:
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
Because Pixel Manager runs in the <head>, the gtag.js script is also injected in the <head>—exactly where Google recommends.
Enable the Console Logger by adding ?pmwloggeron to your URL. You'll see in real-time exactly when and where gtag.js loads, confirming it's injected in the <head> during page load.
3. Google Consent Mode is Always Honored
When Google Consent Mode is enabled (which it should be for GDPR compliance), gtag.js still loads in the <head> but waits for user consent before sending data.
This is the recommended approach by Google itself:
- The tag loads early (in the
<head>) - It initializes in "consent mode" with default settings
- Data transmission only happens after user consent
Pixel Manager handles this automatically and correctly.
When Warnings Might Be Legitimate
While Google's scanner is often wrong about Pixel Manager's default behavior, there are scenarios where warnings could be valid—but only if you've deliberately changed Pixel Manager's settings or your site uses interfering third-party tools.
Scenario 1: Script Lazy Loading is Enabled (Pro Version)
In Pixel Manager Pro, there's an optional feature to lazy load tracking scripts after user interaction (scroll, click, etc.). This is a deliberate performance optimization.
If enabled:
gtag.jsloads only after the user interacts with the page- Google's scanner will flag this as "late loading"
- This is intentional and has no measurable impact on tracking accuracy
Where to check: WooCommerce → Settings → Pixel Manager → Shop → "Lazy load the Pixel Manager"
If this is enabled and you want to eliminate the warning, you can disable lazy loading. However, we've found no measurable tracking loss when this feature is used correctly.
Scenario 2: Pixel Manager is Deferred (Custom Filter)
Developers can use a filter to defer the Pixel Manager script:
add_filter('pmw_experimental_defer_scripts', '__return_true');
If this filter is applied:
- Pixel Manager loads later in the page lifecycle
gtag.jsinjection is also delayed- Google's scanner may flag this
This is not a default setting. Check your theme's functions.php or custom plugins to see if this filter has been added.
Scenario 3: Third-Party Interference
Several types of tools can interfere with Pixel Manager's loading behavior:
JavaScript Optimizers
Plugins like Autoptimize, WP Rocket, or Asset CleanUp may:
- Bundle, minify, or defer Pixel Manager's script
- Change the loading order
- Delay script execution
Solution: Exclude Pixel Manager from optimization. Most optimization plugins have settings to exclude specific scripts.
Caching Plugins
Aggressive caching can sometimes serve outdated HTML that doesn't include dynamically injected scripts.
Solution: Clear cache after enabling tracking pixels and test in an incognito window.
Cookie Consent Platforms
Some consent management platforms (CMPs) block script loading entirely until consent is given, rather than using Google Consent Mode.
Examples:
- CookieYes (in certain configurations)
- Complianz (if not configured for Consent Mode)
- Custom consent solutions
If your CMP blocks scripts instead of using Consent Mode, gtag.js won't load until the user accepts cookies. This is a CMP configuration issue, not a Pixel Manager issue.
Solution: Configure your CMP to work with Google Consent Mode instead of blocking scripts entirely.
Page Builders & Theme Frameworks
Some page builders or theme frameworks inject their own head management logic that can interfere with script priorities.
Solution: Test with a default WordPress theme (like Twenty Twenty-Four) to rule out theme interference.
The "Certain Pages Are Not Tagged" Warning
This is one of the most misleading warnings from Google's scanner.
Why it appears:
- Google's scanner looks for
gtag.jsin the static HTML source - Dynamically injected scripts don't appear in the source
- The scanner concludes the page is "not tagged"
The reality:
- Pixel Manager injects
gtag.json every page of your WordPress site - The script executes correctly and sends tracking data
- Google Analytics receives page views, events, and conversions properly
How to verify it's working:
Method 1: Use Pixel Manager's Console Logger
- Add
?pmwloggeronto any page URL on your site - Open your browser's Developer Tools (F12)
- Go to the Console tab
- You'll see detailed logs showing
gtag.jsloading and all tracking events firing
Method 2: Use Google Tag Assistant
- Install the Google Tag Assistant Chrome extension
- Visit your site and click the extension icon
- You'll see Google Analytics 4 listed with events being tracked
- This confirms
gtag.jsis loaded and working correctly
If tracking data appears correctly in your Google Analytics reports and Tag Assistant shows events firing, the Tag Coverage scanner warning is incorrect.
Why Google's Scanner Gets This Wrong
Google's Tag Coverage scanner is designed for simplicity, not accuracy. It uses a basic HTML parser that:
- Looks for static
<script>tags in the source code - Doesn't execute JavaScript or wait for dynamic injection
- Flags anything that doesn't match a hardcoded pattern
This worked well when everyone manually pasted gtag.js into their theme's header.php file. But modern web development has evolved:
- Content Management Systems (WordPress, Shopify, etc.) use dynamic injection
- Consent management requires conditional script loading
- Performance optimization demands asynchronous loading
Google's scanner hasn't fully adapted to these patterns, leading to false positives.
What You Should Do
If You're Using Default Settings
Ignore the warnings. Your gtag.js implementation is correct.
To verify everything is working:
- Check your Google Analytics real-time reports—are page views showing up?
- Trigger a test conversion—does it appear in GA4?
- Use Pixel Manager's Console Logger (
?pmwloggeron) to see exactly what's happening—it showsgtag.jsloading, all events firing, and data being sent to Google Analytics - Install Google Tag Assistant Chrome extension to confirm tags are firing
If tracking works correctly, the scanner warning is a false positive.
If You've Customized Settings
Review what you've changed:
- Lazy loading enabled? This is intentional and works fine. If you want to eliminate the warning, disable it.
- Defer filter applied? Remove the filter if you don't need it.
- Third-party optimizers active? Exclude Pixel Manager from optimization.
- Consent platform blocking scripts? Switch to Google Consent Mode integration.
If You're Troubleshooting Real Issues
If your tracking actually isn't working (no data in Google Analytics, events not firing), the issue is likely:
- Pixel ID is incorrect - Double-check your GA4 Measurement ID
- Consent platform blocking everything - Configure Consent Mode properly
- JavaScript errors on the page - Check browser console for errors
- Ad blockers - Test in an incognito window without extensions
The fastest way to diagnose real issues: Use Pixel Manager's built-in Console Logger (?pmwloggeron). It shows you in real-time:
- Whether
gtag.jsloaded successfully - What events are firing and when
- What data is being sent to Google Analytics
- Any errors or consent blocks preventing tracking
This gives you complete visibility into what's actually happening versus what Google's scanner thinks is happening.
The Bottom Line
Google's Tag Coverage scanner is buggy. It doesn't properly detect dynamically injected gtag.js scripts, which is how modern tracking implementations work - including Pixel Manager for WooCommerce.
In its default configuration, Pixel Manager:
- Loads in the
<head>with high priority - Dynamically injects
gtag.jsin the<head>immediately - Fully supports Google Consent Mode
- Tags every page of your site correctly
- Sends complete and accurate tracking data to Google Analytics
The warnings are false positives. If your tracking data appears correctly in Google Analytics and your conversions are being recorded, your implementation is working properly.
Don't break something that's already working correctly just to satisfy a buggy scanner.
Need Help Verifying Your Setup?
If you're unsure whether your tracking is working correctly or need help troubleshooting real issues (not false scanner warnings), check out our documentation:
- Console Logger - Real-time debugging tool
- Google Consent Mode Setup - Proper consent configuration
- Troubleshooting Guide - Common issues and solutions
