feat: add analytics to PromotionalBanner#5898
Conversation
Track impression, CTA click, and dismiss events on the top announcement bar using the existing marketing-CTA pattern. Events are keyed by banner.timestamp (the Banner entity PK) so analytics can slice by individual campaign. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude please review this pr |
|
Claude finished @nimrodkra's task in 1m 13s —— View job PR Review:
|
Summary
Wires impression, click, and dismiss analytics on the top-of-page
PromotionalBanner(Title / Subtitle / CTA / URL / Theme) so marketing can measure campaigns.LogEvent.Impression,LogEvent.Click, andLogEvent.MarketingCtaDismiss— no new event names.TargetType.PromotionalBanner = 'promotion_banner'alongside the otherpromotion_*target types.target_id = banner.timestamp(theBannerentity's primary key) — unique per campaign.MarketingCtaCard,MarketingCtaPopoverSmall,PlusMobileEntryBanner, etc.Impression uses
useLogEventOnceand is gated on!isTesting && !!bannerso it fires exactly once when a banner actually renders.Test plan
impression/click/dismiss promotionevents are emitted withtarget_type = promotion_bannerandtarget_id = <banner timestamp>.Made with Cursor
Preview domain
https://feat-promotional-banner-analytic.preview.app.daily.dev