# Can I ignore some user agents?

**URL:** https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897
**Category:** Support
**Created:** [August 22, 2022, 10:18pm UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897 "2022-08-22T22:18:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [August 22, 2022, 10:18pm UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897/1 "2022-08-22T22:18:54Z")

</div>

As the question states, I want to make it so a user agent is completely ignored from pageview counts.

In summary my forum manager made an app to check to make sure the forum was online, but in return it does this:

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/b/5/7b59e6c09addbf3def8cb522e0445d6dc2e38aec.png)  
I want to make it so the user agent `python-requests/2.21.0` is ignored from pageview counts,

How can I do this?

Thanks!

---

<div class="post-metadata">

### Author: ![hiddenseal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hiddenseal/32/284273_2.png) [@hiddenseal](https://meta.discourse.org/u/hiddenseal)
#### Post date: [August 22, 2022, 10:52pm UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897/2 "2022-08-22T22:52:32Z")

</div>

given that it’s registered as a crawler, try this

> [@How to block all crawlers but Google's](https://meta.discourse.org/t/how-to-block-all-crawlers-but-googles/62431/12):
>
> This is now possible via site settings, search for “crawler”, specifically `blocked crawler user agents`.

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [August 22, 2022, 10:55pm UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897/3 "2022-08-22T22:55:31Z")

</div>

I don’t want to block it, it’s intentional. I only want it to not appear on the pageviews section

---

<div class="post-metadata">

### Author: ![hiddenseal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hiddenseal/32/284273_2.png) [@hiddenseal](https://meta.discourse.org/u/hiddenseal)
#### Post date: [August 22, 2022, 11:20pm UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897/4 "2022-08-22T23:20:23Z")

</div>

I’d guess your only option will be using [Data Explorer](https://meta.discourse.org/t/32566?silent=true) to get data in CSV/JSON format and then visualizing it elsewhere.

I’m not sure if you know this, but if you want to monitor server uptime/responsiveness, you could use things like Prometheus

> [@Discourse Prometheus](https://meta.discourse.org/t/discourse-prometheus/72666):
>
> discourse2Summary Discourse Prometheus is the official [Prometheus](https://prometheus.io/) exporter for Discoursehammer_and_wrenchRepository Link [https://github.com/discourse/discourse-prometheus](https://github.com/discourse/discourse-prometheus)open_bookInstall Guide [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) The Discourse Prometheus plugin collects key metrics from Discourse and exposes them in the /metrics path so prometheus can consume them. These metrics can be used to Graph all sorts of data like: Median and 99th percentile time…

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 23, 2022, 12:48am UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897/5 "2022-08-23T00:48:39Z")

</div>

Have his app check `/srv/status` for “ok”

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 23, 2022, 5:19am UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897/6 "2022-08-23T05:19:44Z")

</div>

There was a similar request

> [@Is there a way to delete the page views statistics for a given day?](https://meta.discourse.org/t/is-there-a-way-to-delete-the-page-views-statistics-for-a-given-day/227925):
>
> My site had a DDos attack and therefore got too many “page views”. This amount is making the “Consolidated Pageviews” report pretty useless since the scale is totally distorted. You can see the report in the screenshot below. Is there a way to “fix” this scale maybe by deleting the data for that day or something similar?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 23, 2022, 5:58am UTC](https://meta.discourse.org/t/can-i-ignore-some-user-agents/236897/7 "2022-08-23T05:58:37Z")

</div>

Deleting data because of ddos is very different than needing a way to check if a server is up without counting the checks as page views.
