Skip to content

Update analytics tracking skill with document-level click tracking best practices#2159

Merged
morgan-wowk merged 1 commit intomasterfrom
update-analytics-skill
Apr 24, 2026
Merged

Update analytics tracking skill with document-level click tracking best practices#2159
morgan-wowk merged 1 commit intomasterfrom
update-analytics-skill

Conversation

@morgan-wowk
Copy link
Copy Markdown

@morgan-wowk morgan-wowk commented Apr 24, 2026

Description

Updates the analytics tracking skill documentation to reflect the preferred tracking() helper pattern for click events. The updated guide explains how the document-level useClickTracking listener automatically fires analytics events when data-tracking-id attributes are present on interactive elements, eliminating the need for manual track() calls in most click scenarios.

Key additions include:

  • How to use tracking() with and without metadata
  • Prop drilling patterns for forwarding tracking attributes through component hierarchies
  • Radix asChild usage with tracking()
  • A clear decision table for when manual track() calls are still appropriate (outcome events, impressions, debounced events, toggle state, non-interactive elements)
  • Updated naming convention rules distinguishing tracking() identifiers (no action verb — .click is appended automatically) from manual track() identifiers (full action verb required)
  • Revised action verb reference table reflecting the new patterns (completed, toggle added; hover, shortcut_pressed, submit, start removed)
  • Updated examples showing correct and incorrect usage under the new approach

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

Review the updated .claude/skills/analytics-tracking/SKILL.md to verify the documentation accurately reflects the tracking() helper and useClickTracking patterns used in the codebase.

Additional Comments

…st practices

Rewrites the skill to lead with the tracking() helper as the preferred
approach for click events, explains when manual track() is appropriate
(outcomes, impressions, debounced, toggles, non-interactive elements),
and documents prop drilling as the intended pattern for getting
data-tracking-id onto DOM elements through component layers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: update-analytics-skill/bf8b2c8

Copy link
Copy Markdown
Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@morgan-wowk morgan-wowk marked this pull request as ready for review April 24, 2026 00:23
@morgan-wowk morgan-wowk requested a review from a team as a code owner April 24, 2026 00:23
Copy link
Copy Markdown
Author

morgan-wowk commented Apr 24, 2026

Merge activity

  • Apr 24, 12:55 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 24, 12:55 AM UTC: @morgan-wowk merged this pull request with Graphite.

@morgan-wowk morgan-wowk merged commit 3b52962 into master Apr 24, 2026
17 checks passed
@morgan-wowk morgan-wowk deleted the update-analytics-skill branch April 24, 2026 00:55
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.

2 participants