Skip to content

Page-level visibility time for embed performance reporting#7241

Merged
dvoytenko merged 2 commits intoampproject:masterfrom
dvoytenko:fie14-vistime
Jan 31, 2017
Merged

Page-level visibility time for embed performance reporting#7241
dvoytenko merged 2 commits intoampproject:masterfrom
dvoytenko:fie14-vistime

Conversation

@dvoytenko
Copy link
Copy Markdown
Contributor

Classical performance reporting against the navigationStart time has issues in AMP since AMP pauses all processing while document is invisible. I propose here to also report first/last visibility times.

@tdrl Please guide me what other steps are needed to proceed with these three new metrics?

@dvoytenko dvoytenko requested a review from tdrl January 28, 2017 02:44
@tdrl
Copy link
Copy Markdown

tdrl commented Jan 31, 2017

LGTM. We probably want to add the {first,last}VisibleTimes to ads/google/a4a/google-data-reporter.js#googleLifecycleReporterFactory. Not sure what the best parameter to use for that would be -- probably a met.AD_SLOT_NAMESPACE of some form. Maybe Beng or Warren can comment?

Copy link
Copy Markdown

@tdrl tdrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, modulo comment re: inserting into googleLifecycleReporterFactory.

One small suggestion: Would it make more sense to call it mostRecentVisibleTime instead of lastVisibleTime? When I first read it, I took lastVisible to mean something like "last time before the page is destroyed", rather than "most recent time that page became visible".

@dvoytenko
Copy link
Copy Markdown
Contributor Author

One small suggestion: Would it make more sense to call it mostRecentVisibleTime instead of lastVisibleTime? When I first read it, I took lastVisible to mean something like "last time before the page is destroyed", rather than "most recent time that page became visible".

This seems like a good suggestion and I was going to do it. But I found bunch of similarly named properties with that exact meaning named "last visible time". So, with that, I'd rather keep it as is. But thanks a lot for suggestion.

@dvoytenko
Copy link
Copy Markdown
Contributor Author

@tdrl Two changes since last review:

  1. I pass met.a4a query parameters in the reporter.
  2. I also signal preAdThrottle. I'll be happy to rename if desired. But I wanted to have a directly comparable (and hopefully same name) signal as in 3p that directly pings the layoutCallback start.

PTAL.

@dvoytenko dvoytenko merged commit 8120601 into ampproject:master Jan 31, 2017
@dvoytenko dvoytenko deleted the fie14-vistime branch January 31, 2017 21:51
torch2424 pushed a commit to torch2424/amphtml that referenced this pull request Feb 14, 2017
…t#7241)

* Page-level visibility time for embed performance reporting

* ping URL parameters and layout ping
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
…t#7241)

* Page-level visibility time for embed performance reporting

* ping URL parameters and layout ping
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