# 试图弄清楚页面浏览量查询

**URL:** https://meta.discourse.org/t/trying-to-figure-out-page-views-queries/83986
**Category:** Data & reporting
**Created:** [2018年三月27日 19:18 UTC](https://meta.discourse.org/t/trying-to-figure-out-page-views-queries/83986 "2018-03-27T19:18:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [2018年三月27日 19:18 UTC](https://meta.discourse.org/t/trying-to-figure-out-page-views-queries/83986/1 "2018-03-27T19:18:45Z")

</div>

So I’m reviewing the page views, and trying to identify queries for “Content Views” vs “User Visits” so I can gather some metrics around those 2, and the only thing I can figure out is using the `application_requests` table based on the Dashboard sql being ran (e.g. `/admin/reports/page_view_total_reqs` and others). What I am unsure of is this `req_type` field in the `application_requests` table and what the available values mean?

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [2018年三月27日 19:34 UTC](https://meta.discourse.org/t/trying-to-figure-out-page-views-queries/83986/2 "2018-03-27T19:34:07Z")

</div>

The req\_types are from this list:

> <https://github.com/discourse/discourse/blob/main/app/models/application_request.rb#L4-L14>

The first one maps to 0, second one 1, etc.

http\_total (0) is the total requests, http\_2xx (1), http\_3xx, etc. are requests that return those [status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes).

page\_view\_crawler counts requests that were from web crawlers, based on their user agents.

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [2018年三月27日 21:09 UTC](https://meta.discourse.org/t/trying-to-figure-out-page-views-queries/83986/3 "2018-03-27T21:09:49Z")

</div>

Perfect - thanks! Now I gotta decide if any of the http\_\* are worth using 😃

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年六月8日 12:37 UTC](https://meta.discourse.org/t/trying-to-figure-out-page-views-queries/83986/4 "2024-06-08T12:37:43Z")

</div>

该主题已自动关闭，持续 2264 天。不再允许回复。
