Tag Conflicts
What This Means
Tag conflicts occur when multiple tracking implementations interfere with each other, causing duplicate data, missing events, or incorrect attribution. This commonly happens when using both native platform integrations and Google Tag Manager, or when multiple team members implement tracking independently.
Impact:
- Duplicate transactions/conversions
- Inflated or deflated metrics
- Incorrect attribution
- Data discrepancies between platforms
- Wasted ad spend on incorrect optimization
How to Diagnose
Check for Duplicate Tags
Google Tag Assistant:
- Install Tag Assistant
- Navigate through your site
- Look for multiple GA4/UA tags loading
Browser DevTools:
- Open Network tab (F12)
- Filter by "collect" or "analytics"
- Count requests - multiple per action indicates duplicates
Check Data Layer
// Run in browser console
console.log(window.dataLayer);
// Look for duplicate events
window.dataLayer.filter(item => item.event === 'purchase');
Compare Platform Data
- Compare GA4 conversions to platform conversions
- Compare Meta Pixel events to actual sales
- If numbers are 2x or 0.5x, likely duplicate or conflict
General Fixes
1. Consolidate to Single Implementation
Choose one method:
- GTM for all tracking (recommended)
- Native integrations only
- Custom code only
Remove duplicates:
<!-- Remove if using GTM -->
<!-- <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script> -->
<!-- Keep only GTM container -->
<script async src="https://www.googletagmanager.com/gtm.js?id=GTM-XXXXX"></script>
2. Audit All Tracking Sources
Create an inventory:
| Platform | Source | Status |
|---|---|---|
| GA4 | GTM | Keep |
| GA4 | Native app | Remove |
| GA4 | Theme code | Remove |
| Meta Pixel | GTM | Keep |
| Meta Pixel | CAPI | Keep |
3. Fix GTM Container Conflicts
Avoid multiple containers with same tags:
// Check for multiple GTM containers
document.querySelectorAll('script[src*="gtm.js"]');
Merge containers if needed:
- Export tags from duplicate container
- Import into primary container
- Remove duplicate container
4. Handle Native + GTM Conflicts
If you must use both:
// In GTM, check if native already fired
<script>
if (!window._nativeGA4Loaded) {
// Fire GTM GA4 tag
}
</script>
5. Fix Event Timing Issues
Use trigger sequencing:
- Ensure data layer populated before tags fire
- Use "All Pages" trigger with conditions
- Add delays for async data
6. Deduplicate Conversion Tracking
Use transaction ID:
// GTM data layer
dataLayer.push({
'event': 'purchase',
'transaction_id': '12345', // Unique order ID
'value': 99.99
});
GA4 and ad platforms will dedupe based on transaction ID.
Platform-Specific Guides
| Platform | Common Conflict |
|---|---|
| Shopify | Native GA + GTM GA + App GA |
| WordPress | Plugin GA + Theme GA + GTM GA |
| Wix | Native analytics + custom code |
| BigCommerce | Built-in + apps + custom |
Shopify Conflict Resolution
- Go to Settings > Customer events
- Remove custom pixels if using GTM
- Or disable GTM tags if using native
WordPress Conflict Resolution
- Audit all plugins for analytics
- Deactivate duplicate tracking plugins
- Keep one source of truth
Common Conflict Scenarios
Scenario 1: Double-Counting Purchases
Symptom: GA4 shows 2x actual orders. Cause: GTM purchase tag + native checkout tracking. Fix: Disable native, use GTM only.
Scenario 2: Missing Events
Symptom: Add to cart events not firing. Cause: JavaScript error in one implementation breaks both. Fix: Fix JS error or remove conflicting code.
Scenario 3: Attribution Mismatch
Symptom: Meta reports different conversions than GA4. Cause: Different implementations with different timing. Fix: Unify tracking through GTM.
Prevention
Establish Tracking Governance
- Document all tracking implementations
- Designate tracking owner
- Require approval for new tags
- Regular audits (monthly)
Use GTM Workspaces
- Separate workspaces for different teams
- Review before publishing
- Version control and rollback
Verification
After fixing:
- Clear browser cache and cookies
- Complete test transaction
- Check GA4 DebugView - one event per action
- Check Meta Events Manager - matching conversions
- Compare to actual platform data