From d6af4dbc0b9084453467580fd2dc9a0417c71444 Mon Sep 17 00:00:00 2001 From: matst80 Date: Tue, 11 Aug 2026 17:35:11 +0200 Subject: [PATCH] tracking: TrackEvent platform type + custom-track island; bump submodules - platform/event: TrackEvent (track.event) free-form storefront custom events, wired into KnownTypes + the drift-guard surface - data/templates/header.gohtml: emit the custom-track island - backoffice @ b4e6244 (cart upsell catalog caching, custom-track, round-2 editor polish) - go-graph-cms-v2 @ e4cc6d1 (strip-extras failure reporting, custom-track island entry) - slask-tracking @ ed18ed6 (custom-stats analysis + TrackEvent) --- event/event.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/event/event.go b/event/event.go index 1e4cf17..0630359 100644 --- a/event/event.go +++ b/event/event.go @@ -92,6 +92,15 @@ const ( // `track.*` RabbitMQ routing pattern by construction. TrackPromotionView Type = "track.promotion_view" TrackPromotionClick Type = "track.promotion_click" + // TrackEvent — free-form named storefront event (custom analytics + // signals the storefront wires ad hoc: open_cart, plp_sort_change, + // plp_filter_change, …). Producer: lib/track.ts trackEvent() beacons / + // the data-track attribute island (POST /api/track/event). Consumer: + // slask-tracking (pkg/view CustomEvent → pkg/customstats) — per-name + // counters for the tracking read surface. Payload is the wire + // CustomEvent (name + flat string props). Browser-beacon path only, + // like the promotion pair. + TrackEvent Type = "track.event" // Newsletter campaign attribution (review 3.8). Producer: the order // service's MailerSend webhook receiver (cmd/order/newsletter-webhook.go) @@ -207,7 +216,7 @@ var KnownTypes = []Type{ TrackSession, TrackSearch, TrackClick, TrackCart, TrackPurchase, TrackImpression, TrackAction, TrackPageView, TrackPageEngaged, TrackPageAction, TrackExperiment, - TrackPromotionView, TrackPromotionClick, + TrackPromotionView, TrackPromotionClick, TrackEvent, // Track* constants without a browser beacon: consumed over AMQP only, // but the drift-guard test requires every declared Track* constant to // appear here so the HTTP ?event_types= surface stays exhaustive.