See demo video attached.
Looking at the code, the |isPrefetched| bit is set by an OfflinePageBridge#selectPageForOnlineUrl call, which may or may not have fired its callback by the time the metrics are recorded.
Thank you a lot for looking into this and sorry for missing this when adding the metric! I will look into how to fix this, but I feel like we won't be able to merge it into M62. I believe this does not affect clicks and possibly suggestion impressions (unless they appear in NTP without scrolling).
I've fixed metrics for
- number of prefetched article suggestions on NTP when it is opened offline.
NewTabPage.ContentSuggestions.CountOnNtpOpenedIfVisible.Articles.Prefetched.Offline2
- position of prefetched article suggestion impression when offline
NewTabPage.ContentSuggestions.CountOnNtpOpenedIfVisible.Articles.Prefetched.Offline2
Possible remaining issues:
- I did not do anything for clicks, because they happen after NTP is opened. As my testing on device has shown, even on a slow device, input is blocked before NTP finished loading.
- In all 3 metrics we use OfflinePageBridge.selectPageForOfflineUrl, which returns only the most recently created offline page. Thus, if the page is prefetched and then user downloads its URL, it won't be reported in our metrics.
Setting next action reminder to verify that the fix has got into Beta and the fix itself.
Comment 1 by dewittj@chromium.org
, Sep 18 2017Components: UI>Browser>Offline UI>Browser>NewTabPage