Dead ga('send') Universal Analytics call
Tags use ga('send', ...) from analytics.js (Universal Analytics). UA was sunset July 2023. If the UA property is still configured, data goes nowhere.
Summary
- rule_id —
ua-send - purpose — Detect tags using
ga('send', ...)from the legacy Universal Analytics analytics.js library - effect — Calls go unprocessed; UA properties stopped collecting data in July 2023
- layer — container
- reversibility — non-destructive
What fires this
The rule checks active tags for codeAnalysis.hasUaSend, set by the parser when it detects a ga('send', ...) call. The regex matches ga followed by whitespace-tolerant parentheses and the string 'send' or "send". Every tag with a matching call is flagged. Paused tags are excluded. The rule targets ga('send') specifically — the event and pageview dispatch call — rather than all ga() calls.
Why it matters
Google sunset Universal Analytics on July 1, 2023. Any tag still containing ga('send', ...) sends hit data to a decommissioned endpoint. No data is received. If analytics.js is not loaded (the common case after UA→GA4 migration), ga is undefined and the call throws a JavaScript error. If analytics.js is still loaded, it sends to a UA property that is no longer processing hits. Either way the data goes nowhere. The call executes at page load, consumes a network round-trip, and produces nothing.
Before / after
// Custom HTML tag — Universal Analytics hit
ga('send', 'event', 'Video', 'play', 'Product Demo')
// GA4 event via gtag()
gtag('event', 'video_play', {
video_title: 'Product Demo'
})
Remediation
- Open each flagged tag and identify what the
ga('send', ...)call was tracking — event category, action, and label are visible in the arguments. - Determine whether equivalent GA4 tracking already exists in the container.
- If GA4 tracking is missing, create a GA4 Event tag using
gtag('event', ...)or a native GTM GA4 Event tag. - Map the UA hit fields to GA4 event parameters.
- Remove the
ga('send', ...)call. If no other UA calls remain, also remove the analytics.js script load. - Publish the container and verify events appear in 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":"ua-send","url":"https://example.com"}'
User: Run ua-send on https://example.com
# Tool call
{
"tool": "evaluate_rule",
"arguments": {
"rule_id": "ua-send",
"url": "https://example.com"
}
}