Blog

The hidden cost of pageview events at scale

Pageviews are cheap individually and brutally expensive in aggregate. Three patterns to manage the volume.

A page_view event is the smallest, most innocuous tagging request. Sites that grow into millions-of-events territory often discover that pageviews account for 70-90 percent of their event volume, and that the volume is what drives the SaaS bill.

Where the pageview volume goes

A typical session generates 4-7 pageviews. Multiply by your monthly sessions and you get the bulk of your event volume. Conversion events are usually 1-5 percent of total volume; engagement events (scroll, click, video) another 10-20 percent. Pageviews are the rest.

Pattern 1: drop low-value pageviews

Some pages do not need to be tracked: 404s, internal admin paths, automated health checks, redirect intermediate pages. Filter these at your tagging server. The pages still load; the pageview event just does not fire.

const path = getEventData('page_path');
const skipPaths = ['/admin', '/internal', '/healthz', '/404'];
return skipPaths.some(p => path.startsWith(p));

Use as exception trigger on the page_view tag. Drops the volume by 5-15 percent for most sites.

Pattern 2: deduplicate rapid repeated pageviews

Single-page apps sometimes fire two pageviews on a single navigation due to React Router quirks. Bot traffic can fire many pageviews per second. Both inflate the count without adding signal.

A simple dedup: store the last page_view timestamp in a cookie. If a new page_view arrives within 500ms of the last one for the same path, drop it.

Pattern 3: sample below a threshold

For very high-traffic sites where every pageview is genuinely useful but the bill is unsustainable, sample. Send 10 percent of pageviews and 100 percent of conversions. The pageviews retain their statistical shape; the conversions retain their attribution.

Implement at the tag level by generating a random number per request and dropping if above a threshold. Document the sampling rate so analysts know to multiply by 10 when making volume claims.

When to apply which

  • Pattern 1 (filter) for any site. Always worth doing.
  • Pattern 2 (dedup) for SPA-heavy sites or sites with bot pressure.
  • Pattern 3 (sample) for sites genuinely exceeding the high tier of their tagging plan and accepting the data quality trade-off.

Watch your billing impact

After applying any of these, your SprTags plan may move to a lower tier. The savings can be substantial. Set a calendar reminder to review event volume monthly for the first few months after changes.