Session quality & bot filters

In GA4, sessions are the bracket around a user's visit. When sessions arrive without session_start, when sessions start too quickly one after another, or when hundreds of events fire per minute, something is wrong with your tracking - or it's bot traffic.

What does the app check?

Three topics:

  1. Session start coverage - how many sessions have no session_start event?
  2. Session gap analysis - how much time passes between consecutive sessions of the same user?
  3. Event frequency - does a session fire an unusually high number of events? (bot indicator)

When is a check triggered?

Check Threshold
session_start coverage <5 % missing = green, 5-15 % = yellow, >15 % = red
Session gap <30 min normal, 30 min-4 h = warning, >4 h = red
Event frequency >100 events/min = bot indicator
Single-event sessions >30 % = red
Sessions without page_view every one = warning

The thresholds come from app/services/ga4_api_check_service.py:_run_data_checks() and the SQL queries session_consistency.sql, session_gap_analysis.sql and orders_without_session_start.sql.

Typical causes

  • session_start too late → GTM container load time over 2 seconds, server-side tagging with high latency, tracking code in an async script without an initialization guard.
  • Session restartssession_timeout configured too short (10 instead of 30 min), navigation between mobile and web loses cookies, VPN/proxy rotation resets the cookie.
  • Event spikes → faulty for-loop in custom code, scroll tracking too aggressive (e.g. one event per pixel), webhook loop where an external application pumps data back into the property.
  • Sessions without page_view → the tracker fires custom events before the first page view was triggered, or a single-page app doesn't set the first page view.

How to proceed

  1. Open the session consistency section (create_session_consistency_section) in the dashboard - it lists specific session IDs without session_start or without page_view.
  2. If you suspect bots, check the event frequency histogram - sessions with

100 events/min are suspicious.

  1. Filter out bots actively: In the GA4 admin UI under Data Streams → Configure tag settings → List unwanted referrals only referrers are excluded - bot traffic must additionally be blocked via IP filters or via server-side validation.
  2. For session_start gaps, check the GTM trigger: does the GA4 Configuration tag really fire on every page before all custom events?