Understanding pageviews and the site traffic report

:bookmark: This is an explanation about how Discourse handles pageviews and how to interpret the “Site traffic” report.

:person_raising_hand: Required user level: Administrator

What are pageviews in Discourse?

Pageviews in Discourse are counted as all requests for content by humans. This includes:

  • Requests for lists of categories, topics, or posts
  • The first load of a page
  • Transitions between routes (e.g., moving from topics to the latest list)

This does not include:

Discourse works to ensure that pageviews are only counted on initial page loads or significant route changes to avoid inflating the numbers.

:information_source: In September 2024, we improved the way in which pageviews are tracked and counted. Here’s an explanation of what changed.

The site traffic report

To access the report:

  1. As an administrator, go to the Discourse dashboard
  2. Navigate to discourse.example.com/admin/reports/site_traffic

Understanding the report categories

  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 and anonymous browsers count toward the pageview limits on hosted plans.

Reading the report

The report displays data in a stacked area chart format, which allows you to visualize the composition and trends of pageviews over time:

  • The X-axis represents the date range
  • The Y-axis shows the number of pageviews
  • Each category is represented by a different color in the stacked areas according to the legend above the report

The stacked nature of the chart allows you to see:

  • The total traffic for each day (the top of the entire stack)
  • The proportion of each category within the total
  • Trends over time for each category and the total

Above the chart, you’ll find a legend that matches colors to categories, helping you interpret the data.

Interacting with the chart

  1. Date range: You can adjust the date range using the date picker below the report.
  2. Hover for details: Hover over any point on the chart to see a tooltip with exact numbers for each category on that specific date.
  3. Filtering: Click on the items in the legend to show/hide each category, allowing you to focus on particular data sets.

:information_source: If you’re not seeing expected results, click the Refresh Report button to load the latest data.

Using pageview data

Pageview data can be valuable for understanding site traffic and user engagement. Some ways to use this data include:

  1. Tracking overall site activity: Monitor total pageviews over time to see trends in site usage.
  2. Assessing user engagement: Compare logged-in vs. anonymous browser pageviews to understand how many of your visitors are registered users.
  3. Monitoring crawler activity: Keep an eye on known crawler pageviews to ensure your site is being properly indexed by search engines.
  4. Identifying unusual activity: Sudden spikes in any category could indicate viral content, potential issues, or attacks.

Legacy tracking method

Discourse’s legacy method, that began being phased out in September 2024, counted 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.

:information_source: If you would like to access the reports for the legacy method to better track your pageview history you will find them in the “Legacy Consolidated Pageviews” and “Legacy Pageviews” reports.

Additional resources

Last edited by @hugh 2024-10-24T01:49:04Z

Last checked by @hugh 2024-10-24T01:49:10Z

Check documentPerform check on document:
2 Likes

A post was split to a new topic: Drilling down into site visit details