Understanding pageview tracking on hosted plans

:bookmark: This topic explains the difference between Discourse’s legacy pageview tracking method and the new pageview tracking that was introduced in September 2024.

:person_raising_hand: Required user level: Administrator

In September 2024, Discourse introduced a better way of tracking and reporting pageviews, providing more detailed insights into site traffic. This document outlines the key differences between the old method and the new approach.

Legacy tracking method

Discourse’s legacy method counts pageviews as all requests for content, including:

  • Requests for lists of categories, topics, or posts
  • Initial page loads
  • Transitions between routes
  • All crawlers, whether known or unknown
  • All Discourse API requests

The system would attempt to count pageviews only on initial page loads or significant route changes to avoid inflating numbers, and the pageviews would be listed as a single metric, with all of them counting toward pageview limits on hosted plans.

Current tracking method

:information_source: We are in the process of rolling this pageview tracking out to hosted customers, so not all sites will be switched over right away.

The new method, presented in the “Site traffic” report, offers a more nuanced view of site traffic by categorizing pageviews into four types:

  1. Pageviews (logged in): Pageviews from users who are logged into your Discourse instance.
  2. Pageviews (anonymous): Pageviews from users who are not logged in but are using a web browser.
  3. Known crawlers: Pageviews from identified web crawlers or bots (e.g., search engine crawlers).
  4. Other traffic: This category includes various types of requests that don’t fall into the other three categories, including other crawlers.

The default report view hides the known crawlers and other traffic metrics, so that it aligns with the pageview metrics displayed elsewhere in the dashboard.

:information_source: Note that only logged in browsers and anonymous browsers count toward the pageview limits on hosted plans.

Key differences

  1. Detailed categorization: Unlike the current method, which provides a single pageview count, the new approach breaks down views into specific categories, offering more context about the nature of the traffic.

  2. Accurate pageview counts: The new method of tracking pageviews means your metrics will align with what you see in other tracking software, like Google Analytics.

  3. Better crawler detection: The new method explicitly identifies and reports on known crawler activity, which can help in understanding how search engines and other bots interact with your site.

  4. More accurate billing: With core pageview metrics no longer taking crawlers and other traffic into account, the pageviews that count toward your limit on hosted plans will be lower and more accurately reflect how your site is being viewed.

Accessing the new report

To view the new site traffic report:

  1. Log in as an administrator
  2. Go to the Discourse dashboard
  3. Navigate to discourse.example.com/admin/reports/site_traffic

Find out more about pageview tracking and the site traffic report here:

6 Likes