TryGhost
OSS
Ghost
Added gift_link dimension to the web analytics tracker on gift reads ref https://linear.app/ghost/issue/BER-3746/integrate-gift-link-usage-tracking-with-analytics - gift-link usage is moving onto the existing analytics pipeline instead of the DB counter, so the numbers stay consistent with the rest of site analytics - ghost_head's tracker emits the gift-link token as `tb_gift_link`, the same ghost_head -> ghost-stats courier path that already carries post_uuid, member_status, etc. - the reader path sets the verified token on res.locals as `_giftLink`, so it merges onto the render context root where both the tracker (dataRoot._giftLink) and ghost_foot's toast read it. This renames the internal flag (`_gift` -> `_giftLink`, matching the `gift_link` dimension) and moves it off the @data frame onto res.locals so it reads like post_uuid/member; internal flag, not a theme API - always emitted, empty when not a gift, so the backend's `gift_link != ''` check decides what counts as gift traffic rather than the producer special-casing it - e2e-frontend gift-links tests now assert the rendered tracker output: a verified token reaches `tb_gift_link`, while a forged token, a token for another post, and a normal read all render an empty `tb_gift_link` — proving an unverified token never enters analytics
nx run ghost:test:e2e
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx run ghost:test:e2e
Click to copy
Linux
4 CPU cores
read-write
access token used
18182217
28853