Storefront Analytics: Pixels and Customer Events

storefront analytics · in production

a widget nobody measures is a widget nobody renews. during my time at Renoon I owned the analytics that answer the question brands actually ask: do shoppers who engage with the widget convert and spend more than those who don't?

21 brands wired · 3 delivery paths · 4 event types · 2 reference builds

Three ways an event reaches a dashboard

Same widget, three very different storefront stacks:

  1. GTM brands: the widget pushes bare view, click, open and close events to the dataLayer; one GA4 tag per event does the rest.
  2. In-house: every widget and QR microsite reports through a backend proxy into our own dashboard, so the brand's analytics and ours never depend on each other.
  3. No GTM: the widget publishes events straight into the Shopify customer events pixel sandbox with Shopify.analytics.publish; the store's existing GA4 pixel subscribes and forwards them.

The no-GTM exception

One of the brands runs no GTM at all. Its GA4 is fed exclusively by Shopify customer events pixels, which run in an isolated sandbox that cannot read the dataLayer, so the widget's signal was being dropped on the floor. The fix: publish into the sandbox directly, and let the store's existing pixel forward with its own gtag instance and consent handling.

Views fire from an IntersectionObserver when the widget is actually seen; clicks pass through a whitelist of meaningful actions. Since the Shopify admin is not in git, the pixel source lives version-controlled in the repo as the single source of truth. Verified live: both events reaching GA4 with full parameters.

Proving value, not counting clicks

One denim client's property is the reference implementation on the GTM side: I rewrote the injection tag in the client's own container, shipped it myself, and unblocked locale routing that had drifted unpublished for two months. On top of the events, a GA4 exploration compares shoppers who clicked the widget against those who didn't, across the store's native ecommerce metrics. That comparison, not a raw view count, is the number the brand renews on.

Stack: GTM, GA4, Shopify Customer Events, JavaScript.