-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[amp-story] Fix story_page_count #33948
Conversation
Hey @gmajoulet! These files were changed:
Hey @mszylkowski! These files were changed:
Hey @newmuis! These files were changed:
|
ee04eba
to
c68f645
Compare
Just curious, how was this bug reported? |
It wasn't, I was just playing around with the component and noticed this specific metric wasn't working correctly @gmajoulet |
Good catch! Can you explain how it's failing? Was it sometimes working, sometimes sending 0/null/undefined/not being sent at all? |
The |
Ugh try to fix one bug, but cause another :( I thought we manually tested this? Lets make sure we have a test with all the story specific vars? |
(cherry picked from commit c78f3bb)
The
storyPageCount
in<amp-story-auto-analytics>
wasn't actually sendingstoryPageCount
. The problem is that the AMPvisible
(alsoini-load
, etc..) trigger goes through the non-story analytics service, which will not contain any of the story-specific variables (likestoryPageCount
).This change introduces a
StoryAnalyticsEvent.STORY_CONTENT_LOADED
trigger that fires once the story is loaded. By using this event, we make sure that the story-specific variables that we need are there when the event is fired.