Forem Creators and Builders 🌱

Daniel Uber
Daniel Uber

Posted on

Update to article stats page

If you regularly use the article stats page to watch your traffic, a change was shipped today that will affect the "traffic source summary" counts shown at the bottom of that page. You will likely see an increase in some of those numbers, and may see some re-ordering of the sources, as we're changing the way we interpret the count when displaying this top 20 list, to better match how we're recording page views.

If you're using a private community (users must be logged in to view any articles) this won't affect you at all, those sources were already correct, since we record every page view from logged in users, however the referrers from external domains to articles on those sites will probably be limited, too.

A community member noticed that the count of article reads and the count by referrer source didn't line up (external page visitors from google.com appeared to be counted 10 times for each item in the page views). In their specific case we showed 20 page views, but only 2 visits (both from google.com).

This exposed some internal logic we have around recording article analytics. Forem only updates the page view counter 10% of the time for visitors who aren't logged in, but counts these visits 10 times higher than logged in views (this was always working in the top part of the statistics page, where we show the total of the page views).

The "Traffic Source Summary" section of the stats page was counting the number of visit events (rather than adding the weighted counts, so missing the 10x weight on these visits).

That's been adjusted, we now are adding up the visit counts the same way at the top and at the bottom.

It's worth noting this is a change only to the display, not the retrieval or tracking of page views, the underlying data is not being adjusted, only the interpretation of it on the stats page.

There are a few other items in how this page works worth noting - the top sections for Week, Month, and Infinity and the time series plots associated with them, have a per-article and per-period cache to avoid constantly recalculating these values when viewed. This means the top section may appear to be standing still while the traffic source grows - this is really only an issue if you're constantly refreshing the article statistics. Since the cache key includes the current date in the range, and the range is used to validate the caching - you should see a new value each day, but may see no change on subsequent views each day.

Oldest comments (0)