ampproject / ampproject/amphtml
[amp-story-player] Not firing analytics when web story is loaded by story-player
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I am assuming that GA tracking is fired just the same when my web story is loaded through the amp-story-player. But this is not valuable information to me, it actually makes it difficult for me to know how many times people viewed the web story in standalone version.
When the web story is loaded through the amp-story-player, it is just a widget in another page. This is not what the viewer clicked on and came for. The viewer might even not scroll to the story player and never see it, yet I am assuming that the player will load the story, and that it will fire a "visit" on the web story. This is all just interfering with my reports.
Is there a way to shut down analytics when the web story is loaded from the player? Or make a distinction in any way that would show in my reports?
### Alternatives Considered
I suggest a parameter to the amp-story-player that allows us to shut down GA within the web story.
Thanks for your consideration.
### Additional Context
_No response_
Contributor guide
Research direction
Start by tracing how analytics are triggered when a web story is loaded through the amp-story-player. Determine whether the player can expose a way to disable or distinguish those events, and consider the work complete when standalone and embedded views can be separated or embedded analytics can be suppressed.
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