ampproject / ampproject/amphtml
Track link clicks in `amp-story-auto-analytics`
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
With regular `amp-analytics` is was possible to add events for triggers like `story-page-attachment-enter` and `story-click-through` to track clicks on inline links and page attachments / outlinks.
This capability is currently missing from `amp-story-auto-analytics` and I think would be useful to add tracking for these & potentially also surface that in the Data Studio dashboard for example.
### Alternatives Considered
Add a custom `amp-analytics` configuration in addition to `amp-story-auto-analytics` that tracks these events.
### Additional Context
_No response_
Contributor guide
Research direction
Start by locating the amp-story-auto-analytics entry point and comparing its behavior with regular amp-analytics. Review how the story-page-attachment-enter and story-click-through events are handled for inline links, page attachments, and outlinks. Done means these clicks are tracked by amp-story-auto-analytics; assess separately whether the Data Studio dashboard should surface them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100