HomeMethod

Knowledge

Web VitalsTechniquesSnippetsAnswersImpactsBottlenecks

Unoptimized tracking events

  • JavaScript

Problem Summary

Unoptimized tracking events happen when analytics, pixels, tag managers, heatmaps, or conversion scripts fire too often or too early.

Performance Impact

  • Main-thread work: Tracking scripts compete with page rendering
  • Network congestion: Many beacon requests crowd the waterfall
  • Poor INP: Click handlers can trigger heavy synchronous tracking
  • Privacy and consent risk: Tags may fire before consent rules apply

How to Detect

  1. Network tab: Filter analytics, collect, pixel, beacon, and tag requests
  2. Tag manager preview: Review event triggers and duplicate tags
  3. Performance traces: Check script execution after clicks and scrolls

Solutions

1. Remove Duplicate Tags

Make sure the same analytics library is not installed by the theme, plugin, and tag manager.

2. Delay Noncritical Tracking

Fire low-priority tags after consent and after the page becomes usable.

3. Reduce Event Volume

Avoid tracking every scroll tick, mouse movement, or repeated visibility event.

4. Use Server-Side Tracking Carefully

Move expensive client work away from the browser only when attribution requirements justify it.

Support our family now