Back to the archive
Ecommerce Analytics

Queued Is Not Counted: Ecommerce sendBeacon Analytics

Diagnose missing ecommerce analytics with sendBeacon queue checks, small payloads, collector reconciliation, and a practical delivery verification workflow.

An operator studying ecommerce analytics and conversion dashboards.

A shopper leaves a product page, the browser accepts an analytics beacon, and the reporting dashboard never receives the event. There is no contradiction: accepting a request into a browser queue and storing a usable analytics record are different milestones. Treating them as one success state makes missing data difficult to diagnose.

EcomToolkit recommends measuring the delivery path as a series of accountable steps. This guide focuses on small storefront analytics messages, not order processing. The examples and counts below are hypothetical. They show how to investigate losses without slowing navigation, inventing certainty about delivery, or turning a diagnostics script into another performance problem.

Table of Contents

Define what the browser actually confirmed

The MDN sendBeacon reference describes an asynchronous POST mechanism intended for small analytics payloads. Its boolean return value reports whether the browser queued the data. A true result is not an application response, a successful warehouse insert, or proof that a dashboard accepted the event.

Name the local result accordingly. An internal metric called beacon_queued is easier to interpret than event_delivered when all the code has observed is a true return value. Likewise, a false return should be recorded as queue rejection rather than a server failure, because the server may never have seen the request.

Separate generation, attempted dispatch, queue acceptance, collector receipt, schema validation, and downstream availability. Different owners can then investigate different gaps. A frontend developer cannot fix a warehouse filter by changing a browser lifecycle handler; an analyst cannot fix rejected browser payloads by refreshing a report.

Team reviewing an ecommerce measurement workflow

Build a small delivery ledger

Use a short opaque event identifier and a schema version in test payloads. The collector can then reconcile received identifiers against a controlled set generated by the test harness. Avoid personal information in those identifiers, and apply the same consent and data handling rules as the underlying analytics pipeline.

The ledger should distinguish event records from network requests. One request can contain several events, and a retry can repeat the same event. Counting POST requests on the server and comparing that number with page views on the client is not a valid completeness calculation unless the relationship is explicitly one to one.

Hypothetical stageUnique event IDsWhat the count establishes
Generated in a controlled test1000Known eligible test records
Accepted into browser queues970Local queue acceptance
Received by the collector950Server receipt, before validation
Accepted after validation930Records suitable for processing
Visible after the reporting window925Downstream report availability

Here, queue acceptance is 97% of generated records, while final visibility is 92.5%. The intermediate differences are 30, 20, 20, and 5 records. These are diagnostic counts from a bounded test, not estimates of real customer loss or an industry delivery benchmark.

Production completeness is harder because the browser may disappear before reporting its own failure. State that limitation. A client counter transmitted through the same failing path cannot independently prove the number of missing events. Controlled tests, collector logs, and independently defined business records each answer different parts of the question.

Keep payloads comfortably below the queue ceiling

MDN documents a 64 KiB limit on the total queued data for this mechanism. Treat that as a ceiling to respect, not a recommended batch size or an allowance available to every concurrent call. A small final message can still encounter pressure if other queued work is outstanding.

Measure encoded bytes, not the number of JavaScript characters. Product names, localized labels, and serialized arrays can produce unexpected payload growth. Build a representative test using long names and non-ASCII characters, then inspect the actual body size. A hundred short English labels is a weak stress case for an international catalog.

Send compact identifiers and essential measurements instead of entire product objects. A timing event rarely needs descriptions, all variant options, or the full cart. Specify a local payload budget with enough room for schema growth, and make budget violations visible during development rather than silently trimming fields in production.

If batching is useful, limit both record count and bytes. Flush while the page is active at sensible checkpoints instead of relying on a large final batch. Balance that approach against request overhead and measurement cost; sending every mouse movement individually creates its own avoidable traffic and processing load.

Treat lifecycle changes as checkpoints

MDN recommends using the transition to a hidden document for end-of-page analytics and explains why unload-related events are unreliable, particularly on mobile. Hidden does not necessarily mean the shopper has permanently left. They may switch tabs, inspect a payment app, or return moments later.

Make checkpoint handling safe to repeat. Keep a clear distinction between unsent records and records already assigned to a batch, so a second visibility transition does not recreate the same logical events with new identifiers. A deduplicating collector helps preserve meaning if the same identifier arrives again.

For the measurement side of this problem, read the guide to background-tab performance timing. It explains which time intervals belong in a storefront performance metric. Delivery engineering answers a separate question: whether a valid measurement becomes an available record.

Do not block a shopper’s navigation to improve an analytics success rate. Analytics exists to explain commerce; delaying checkout handover so a diagnostic message can finish reverses that relationship. Evaluate the dispatch code itself in a trace, especially serialization work attached to a navigation action.

Colleagues discussing an ecommerce analysis

Diagnose the collector before changing the browser

A received request can still fail validation because of a renamed property, a missing version, an invalid timestamp, or a field type that changed during release. Preserve enough structured rejection information to identify the schema problem without storing unnecessary customer data or the entire rejected payload indefinitely.

Review collector response patterns, validation counters, processing queues, and reporting filters as separate evidence. Browser developer tools are useful during a controlled test, but they are not a durable accounting system. A successful local demonstration does not prove that all browser and network combinations behave identically.

SymptomFirst investigationEvidence to retain
Queue rejection risesPayload bytes and concurrent dispatchBatch size and local return value
Receipt trails queued test IDsNetwork and endpoint behaviorMissing IDs from the controlled fixture
Validation losses riseSchema compatibilityRejection reason by version
Valid records vanish downstreamProcessing lag and filtersCollector-to-report reconciliation
Counts exceed expected eventsRetries and ID stabilityDuplicate identifiers and timestamps

Use a fixed reporting cutoff when reconciling stages. A record received a second ago may not belong in the same availability comparison as a record received yesterday. Publish both a matured completeness view and a recent-arrivals view if the operational team needs fast feedback during a release.

Keep purchase truth outside the beacon

A purchase beacon is a useful observation about the browser journey. It should not be the mechanism that creates the order, confirms payment, reserves inventory, or establishes financial truth. Those responsibilities require the authoritative commerce systems and their own transaction handling.

Reconcile analytics purchase observations with eligible business records using a documented definition. Differences can reflect consent, tracking coverage, refunds, test orders, timing, or event defects. Do not label every discrepancy a beacon transport failure, and do not repair analytics by manufacturing events for users whose collection choices excluded them.

The existing GA4 tracking audit helps distinguish event accuracy from revenue interpretation. Combine that semantic review with delivery checks so the team does not celebrate transporting an event that contains the wrong currency or order value.

Run a release acceptance exercise

Create a small fixture that generates known event IDs while navigating product, collection, and cart pages. Include repeated tab switches, fast navigation, a large but permitted payload, deliberate schema rejection, and a network interruption. Keep test events segregated from business reporting and remove any temporary instrumentation after the exercise.

For each case, record what was generated, queued, received, accepted, and visible after the agreed delay. Check duplicates as well as missing records. Assign failures to a stage before deciding whether the fix belongs in payload construction, lifecycle handling, the collector, or the reporting model.

Write the acceptance note in terms of the tested conditions. Saying that every fixture record reached the test collector is defensible when the ledger proves it. Saying that the store can no longer lose analytics is not. Retain the fixture version so future changes can repeat the same comparison.

The EcomToolkit view

Reliable analytics begins with honest success labels. A queued message is useful progress, but only an observable collection and processing path can show where that progress stops. Keep the payload small, preserve stable identifiers, and investigate losses at the stage where the evidence places them.

If your storefront reports disagree with collector or order records, request an EcomToolkit audit to review the measurement contract and delivery checkpoints together.

Related partner guides, playbooks, and templates.

Related ecommerce guides.

Free Shopify Audit

Get a free Shopify audit focused on the fixes that can move revenue.

Share the store URL, the blockers, and what needs attention most. EcomToolkit will review UX, CRO, merchandising, speed, and retention opportunities before replying.

What you get

A senior review with the priority issues most likely to improve performance.

Best for

Brands planning a redesign, migration, CRO sprint, or retention cleanup.

Reply route

Every request is routed to info@ecomtoolkit.net.

We use these details to review your store and reply with the next best steps.