ampproject / ampproject/amphtml

Track link clicks in `amp-story-auto-analytics`

Open
#38,083 1 comment 0 reactions 0 assignees View on GitHub
Stale Type: Feature Request WG: analytics WG: stories
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.