tracking: promotion view/click event types + storefront beacons (submodule bumps backoffice, slask-tracking)
This commit is contained in:
1 parent
4aa9c91bc7
commit
f1e6f1c44f
1 file changed
+16
@@ -81,6 +81,17 @@ const (
|
||||
// 5 hand-written `pevent.Type("track.purchase")` literals with this
|
||||
// typed constant.
|
||||
TrackPurchase Type = "track.purchase"
|
||||
// TrackPromotionView / TrackPromotionClick — storefront promotion
|
||||
// attribution. Producer: the storefront promotion-badge islands, PLP
|
||||
// promo badges, bundle picker and cart bundle upsell (lib/track.ts
|
||||
// beacons → POST /api/track/promotion). Consumer: slask-tracking
|
||||
// (pkg/view PromoStats) — per-promotion view/click counters for the
|
||||
// promotions admin. Payload is the wire PromotionEvent (promotion id,
|
||||
// action, placement, optional item id). These ride the browser beacon
|
||||
// path only (no AMQP producer today), so they stay out of the
|
||||
// `track.*` RabbitMQ routing pattern by construction.
|
||||
TrackPromotionView Type = "track.promotion_view"
|
||||
TrackPromotionClick Type = "track.promotion_click"
|
||||
|
||||
// Newsletter campaign attribution (review 3.8). Producer: the order
|
||||
// service's MailerSend webhook receiver (cmd/order/newsletter-webhook.go)
|
||||
@@ -196,6 +207,11 @@ var KnownTypes = []Type{
|
||||
TrackSession, TrackSearch, TrackClick, TrackCart, TrackPurchase,
|
||||
TrackImpression, TrackAction, TrackPageView, TrackPageEngaged,
|
||||
TrackPageAction, TrackExperiment,
|
||||
TrackPromotionView, TrackPromotionClick,
|
||||
// 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.
|
||||
TrackCampaignOpen, TrackCampaignClick,
|
||||
}
|
||||
|
||||
// IsKnownType reports whether s matches one of the declared Track*
|
||||
|
||||
Reference in new issue
Block a user