Dead _gaq.push() call
Tags push events to _gaq (the legacy ga.js async queue). ga.js has been deprecated since 2014 and sunset. These calls do nothing.
Summary
- rule_id —
gaq-push - purpose — Detect tags that push events to the legacy
_gaqUniversal Analytics async queue - effect —
_gaq.push()calls execute silently and send no data; analytics gaps go undetected - layer — container
- reversibility — non-destructive
What fires this
The rule checks active Custom HTML tags for codeAnalysis.hasGaqPush, set by the parser when it detects a _gaq.push( call in the tag code. Every tag containing that pattern is flagged. The rule does not inspect the arguments — any _gaq.push call triggers it. Paused tags are excluded.
Why it matters
_gaq is the async command queue for ga.js, the original Google Analytics library. Google deprecated ga.js in 2014 and sunset it entirely. The queue object may still exist on pages that load a stub or leftover snippet, but no library processes it. Calls appear to succeed — no JavaScript error is thrown — while sending zero data. Teams relying on these tags for conversion or event tracking receive silently incomplete analytics. Replace with GA4 events or gtag() calls.
Before / after
_gaq.push(['_trackEvent', 'Form', 'Submit', 'contact-us'])
gtag('event', 'form_submit', {
event_category: 'Form',
event_label: 'contact-us'
})
Remediation
- Open each flagged tag and identify all
_gaq.pushcalls. - Determine whether the tracked action is still needed in analytics.
- If still needed: replace each call with the equivalent
gtag('event', ...)or GA4 dataLayer push. - If no longer needed: delete the tag entirely.
- Remove any residual
ga.jsorurchin.jsscript load tags from the container. - Publish and verify events appear in the GA4 DebugView.
Metadata
- Severity
- critical
- Tier
- error
- Category
- dead-code
- Layer
- container
- Version
- 1
- Effort
15min(about 15 minutes)- Reversibility
- non-destructive
See also
- Dead-code rules — other rules in this category
- Health score — how this rule contributes to the score
- Rules catalog — browse all rules
Examples
curl https://developer.tagmanifest.com/v1/evaluate-rule \
-H "Authorization: Bearer $TM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rule_id":"gaq-push","url":"https://example.com"}'
User: Run gaq-push on https://example.com
# Tool call
{
"tool": "evaluate_rule",
"arguments": {
"rule_id": "gaq-push",
"url": "https://example.com"
}
}