Skip to content

Track click destination and untagged intent links - #26

Open
evejweinberg wants to merge 1 commit into
masterfrom
eve/intent-click-tracking
Open

evejweinberg wants to merge 1 commit into
masterfrom
eve/intent-click-tracking

Conversation

@evejweinberg

Copy link
Copy Markdown

Part of the www.modular.com CTA retag (signup = GetStartedClicked, demo = RequestDemoClicked, early access = RequestAccessClicked).

Changes (src/tracking/amplitude.js only):

  • Every tracked click now sends destination (the link's URL). href is still the page URL. Today demo and signup buttons in the same block can't be told apart in Amplitude.
  • Elements with an empty data-analytics-onclick no longer send a blank-named event.
  • Untagged links to /request-demo → RequestDemoClicked; untagged links to console.modular.com/signup → GetStartedClicked. Location is Inline-{page path}. Covers ~53 links in blog post bodies, the pricing FAQ links, and future untagged buttons.

⚠️ dist not rebuilt in this PR. Building current master also emits the Aug 19 "Guard Amplitude tracking against denied consent" change (0b9cb89), whose build was reverted in 0f86408. I didn't want to ship that consent change as a side effect. Whoever owns releases: please decide whether the consent guard should ship, then build, tag (1.5.8) and bump the jsDelivr version in Webflow site custom code.

🤖 Generated with Claude Code

- Add a destination property (the link URL) to every tracked click; href
  stays the page URL.
- Skip elements whose data-analytics-onclick is empty instead of sending a
  blank event.
- Untagged links to /request-demo fire RequestDemoClicked and untagged links
  to console.modular.com/signup fire GetStartedClicked, with location
  Inline-{page path}. Covers blog post body links and anything added
  without a tag.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant