- Shipped
- August 20, 2026 at 1:25 AM UTC
- Author
- kamo
- Commit
- c68f93c
/marketing/discounts was a ComingSoon stub; it is now /marketing/tracking, a working workspace, with the old path kept as a client redirect so existing bookmarks still land. The tab reads "Tracking Codes". A member mints a code and the page shows them the link it produces, built from the host actually serving the page — internal.acme.com yields **************** — so it is correct for every white-label domain without an apex being hardcoded anywhere. The grid carries the six totals per code, and a row opens a drawer with the conversion funnel, the last thirty days, top locations, devices and referrers, and the visitors themselves; a visitor opens their own panel with origin, network, client, UTM attribution and a timeline of every page they opened. Country flags use react-country-flag, as elsewhere. Scope follows the rights: "My team" appears for either cross-member right, "All members" only for VIEW_ALL_MEMBER_TRACKING, and the selector follows the scope the SERVER says it applied rather than the one requested, so a downgrade cannot leave the member reading their own rows under an "All members" label. Chrome paints from --color-primary and --color-secondary throughout, since every org is white-label and MUI's default contained button would render the same blue for all of them. Two things the grid needed that are not obvious. Row clicks are filtered on an explicit marker attribute rather than stopPropagation, because AG Grid listens natively on the row container while React delegates to the root — the React handler runs second, so the copy button and the row menu would both have opened the drawer. And the search is server-side only: a second client-side quick filter could only subtract from a correct result set, hiding rows that matched on member name in a scope with no member column. VIEW_REFERRAL_CODES and MANAGE_REFERRAL_CODES leave the unenforced list — they gate real things now — via a regenerated audit rather than a hand edit. The TS mirrors gain the two new rights and the MARKETING ServiceType they point at, which had been missing.