Stats: improve pageview counts for widget views#5488
Conversation
|
I've made a few fixes to the Jetpack widget files on WP.com to match this change — so both ends should have the same naming and stats bumps. For historical reasons some of the values use hyphens, some underscores (not ideal, but good to keep them the same as before for that reason). |
For reference: r144925-wpcom |
jeherve
left a comment
There was a problem hiding this comment.
In modules/widgets/wordpress-post-widget.php, we sometimes shortcircuit the normal display of the widget when there is no post data to be displayed. Should we add the action there as well?
|
Good point — I thought about that and decided to only count the view on the "full" widget. What do you think is the best approach? |
|
I guess that depends what we usually use the stats for. I think we should count a view if the widget is displayed, even if it doesn’t display posts for some reason. It might have displayed posts at some point in the past, but the remote site stopped answering, maybe because the owner removed Jetpack. |
|
OK, I'm open to putting the call into the |
|
It seems Goodreads, Google+ Badge, Gravatar Profile, and Top Posts use the same logic. |
bf9038e to
3f73c5e
Compare
|
Updates pushed — and squashed commits. |
|
Synced these changes to WP.com in r144995-wpcom |
See #5488 Merges r144995-wpcom.
Ref: #5488 Merges r144925-wpcom.
See #5488 Merges r144995-wpcom.
See #5488 Merges r144995-wpcom.
Ref: #5488 Merges r144925-wpcom.
See #5488 Merges r144995-wpcom.
* Widgets: Facebook Like Box: Fallback to WordPress locale or English for unknown locale See: r117058 See: https://[private link] Merges r120105-wpcom. * Facebook Like Box Widget: Restore 'width' option to support widget areas wider than 340px. We recently removed the width option from this widget in order to allow it to be responsive. However, it defaults to 340px at largest, which is a problem for wider widget areas. This is a partial revert of r119494-wpcom. https://[private link] ed2c2a9 https://[private link]#comment-33575 Merges r121114-wpcom. * Widgets: Facebook Page Plugin: Update the wp-admin strings for "Like Box" to read "Page Plugin" instead, since the code now loads the Facebook page plugin code instead. Merges r123111-wpcom. * Widgets: rename `widget` pageview stat to something more useful: `widget_view`, see #7805. Merges r144861-wpcom. * Widgets: minor code and comments cleanup in Facebook Page Plugin. See #6421. Merges r148069-wpcom. * Widgets: Facebook Page Plugin: better UX for min/max height and width values. Fixes https://github.com/Automattic/customization/issues/53 Merges r148071-wpcom. * Widgets: more attribute escaping for Facebook Page Plugin widget. See r148071. Merges r148072-wpcom. * Widgets: add pageview tracking to more active WP.com widgets, see #7805. Merges r144867-wpcom. * Widgets: minor documentation fixes, code style for Google Translate widget. See #7805 Merges r145017-wpcom. * Widgets: rename `widget` pageview stat to something more useful: `widget_view`, see #7805. Merges r144861-wpcom. * Widgets: sync stats bumps with latest Jetpack changes. See #5488 Merges r144995-wpcom. * Widgets: add pageview tracking to more active WP.com widgets, see #7805. Merges r144867-wpcom. * Widgets: fix a few Jetpack stats bumps, see #7805. Ref: #5488 Merges r144925-wpcom. * Widgets: sync stats bumps with latest Jetpack changes. See #5488 Merges r144995-wpcom. * Widgets: minor documentation fixes, code style for Google Translate widget. See #7805 Merges r145017-wpcom. * Widgets: add Flickr to the services available in the Social Media Icons widget. See #5156 Merges r148065-wpcom. * Widgets: add pageview tracking to more active WP.com widgets, see #7805. Merges r144867-wpcom. * Widgets: sync stats bumps with latest Jetpack changes. See #5488 Merges r144995-wpcom. * Widgets: fix grid layout for Top Posts and Pages to show correct avatar fallback image size of 200 pixels square. FIxes #6664. Merges r148090-wpcom. * Widgets: Update URL to create a Twitter widget This is just a stopgap until we can fully integrate with the new publish.twitter.com setup. See https://github.com/Automattic/io/issues/601 for more info. Merges r137075-wpcom. * Widgets: Update Twitter Timeline to not require a widget ID https://[private link] Merges r137600-wpcom. * Widgets: Twitter Timeline: Use data-width= instead of width= Same for height, and a couple of other cleanups. See: #3283 Merges r137659-wpcom. * Widgets: Twitter Timeline: Fix a PHP notice From review at #4198 Merges r137943-wpcom. * Widgets: rename `widget` pageview stat to something more useful: `widget_view`, see #7805. Merges r144861-wpcom. * Widgets: fix a few Jetpack stats bumps, see #7805. Ref: #5488 Merges r144925-wpcom. * Widgets: sync stats bumps with latest Jetpack changes. See #5488 Merges r144995-wpcom. * Widgets: fix Twitter Timeline height (not used any more) and set maximum number of tweets to 20. Fixes https://github.com/Automattic/customization/issues/74 Merges r148193-wpcom. * Widgets: still honor Twitter Timeline 'height' value if it was previously set. See r148193 and https://github.com/Automattic/customization/issues/74 However, Twitter might not honor it. Merges r148239-wpcom. * Widgets: revert the height changes to Twitter Timeline in r148193. Needs more investigation on why they are ignored by Twitter's embed. See https://github.com/Automattic/customization/issues/74 Merges r148240-wpcom. * Widgets: further improvements to Twitter Timeline tweet limit and height values. Per recommendations by Niall Kennedy: #6021 (comment) * When a valid tweet limit is set, ignore the user given height. * Properly validate the integer value of tweet limit. See r148240 and https://github.com/Automattic/customization/issues/74 Merges r148835-wpcom. * Apply timezone offsets to the upcomingevents shortcode This patch adds changes to the calendar shortcode so that it applies a users timezone to all of the rendered events See https://[private link] Differential Revision: https://[private link] Merges r151822-wpcom. * Apply timezone offsets to the upcomingevents shortcode This patch adds changes to the calendar shortcode so that it applies a users timezone to all of the rendered events See https://[private link] Differential Revision: https://[private link] Merges r151822-wpcom. * Fix calendar reader timezone offsets This revision aims at fixing an issue in the `iCalendarReader` class The function that applies timezone offsets calculates the time difference for timezones using the current date instead of the date thats actually associated with the event. This leads to Daylight Savings Time confusions if today is standard time and the event occurs in daylight savings time. Today (3-8-2017) an event for 3-15-2017 6:30pm will show up as 3-15-2017 5:30pm For effected users see: - https://[private link] - https://[private link] - https://[private link] Merges r152463-wpcom. * Remove duplicated method. Must have been a merge gone bad.
See #5488 Merges r144995-wpcom.
Janitorial naming fix, minor.
The stat name changed on the WP.com side, and this reflects that — it's more specific.
Previously #5478 improved after feedback from @jeherve