feat: track announcement bar clicks with their source and page - #3468
feat: track announcement bar clicks with their source and page#3468juanmahidalgo wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
decentraland-bot
left a comment
There was a problem hiding this comment.
Review Summary
Verdict: Approve ✅
Clean, focused change that adds analytics tracking properties (source, path) to announcement bar events and appends UTM campaign parameters to the shop URL. The implementation is correct and mirrors the marketplace counterpart (#2684) exactly.
What was checked
| Area | Result |
|---|---|
| Correctness | ✅ useMemo with [] is correct — all inputs are static module-level constants. useCallback deps correctly include pathname. |
| Security | ✅ No vulnerabilities. UTM values are hardcoded constants, pathname is router-controlled (not raw user input), no secrets or injection vectors. |
| React patterns | ✅ Proper use of useMemo, useCallback, optional chaining on getAnalytics()?.track(). |
| Cross-app consistency | ✅ Event property shape ({ source, path }) and UTM params (utm_source, utm_medium=announcement_bar, utm_campaign=shop_launch) match the marketplace implementation. |
| Consumer impact | ✅ No public API surface changes — purely internal UI/analytics. |
| Git conventions | ✅ Title follows feat: ... format, branch follows feat/... convention. |
Observations (P2 — non-blocking)
[P2] No test coverage for this component. The marketplace's AnnouncementBar has a spec file that was updated alongside these same changes, but the builder's component has no tests. This is a pre-existing gap — not introduced by this PR — but it would be a good opportunity to add basic tests (event properties, UTM params in the href) similar to the marketplace's AnnouncementBar.spec.tsx.
No P0 or P1 findings — safe to merge.
Reviewed by Jarvis 🤖 · Requested by juanmahidalgo via GitHub
Coverage Report for CI Build 32162690324Coverage remained the same at 52.979%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Follow-up to #3467. Same change as decentraland/marketplace#2684, minus the layout part, which was already handled here.
Changes
Makes the click measurable. The events fired with no properties, and the Marketplace fires the same event names, so clicks from the two apps were indistinguishable in Segment. Both events now carry
sourceand thepaththey happened on.Tags the call to action with campaign params.
utm_source/utm_medium/utm_campaignare appended to the shop URL. The click event alone stops at the click — the params are what let the shop attribute what these visitors do after they land, which is the actual question behind "is the bar working". They are also needed because the link carriesrel="noreferrer", so no referrer reaches the shop.Test plan
source: builder