# Given Apache logs in ES, how do I get Visitor Stay Length for each URL

**URL:** <https://discuss.elastic.co/t/given-apache-logs-in-es-how-do-i-get-visitor-stay-length-for-each-url/290762>\
**Category:** Logstash\
**Created:** [December 2, 2021, 12:01pm UTC](https://discuss.elastic.co/t/given-apache-logs-in-es-how-do-i-get-visitor-stay-length-for-each-url/290762 "2021-12-02T12:01:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mangeshmj1992](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mangeshmj1992](https://discuss.elastic.co/u/mangeshmj1992)\
**Post date:** [December 2, 2021, 12:01pm UTC](https://discuss.elastic.co/t/given-apache-logs-in-es-how-do-i-get-visitor-stay-length-for-each-url/290762/1 "2021-12-02T12:01:57Z")

</div>

Given Apache logs in ES, how do I get Visitor Stay Length for each URL

Apache logs:

```auto
222.105.82.235 - - [16/Nov/2021:10:04:37 +0530] "GET /admin/ HTTP/1.1" 301 529 "http://facebook.com/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/DB4D4D"

```

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [December 2, 2021, 2:05pm UTC](https://discuss.elastic.co/t/given-apache-logs-in-es-how-do-i-get-visitor-stay-length-for-each-url/290762/2 "2021-12-02T14:05:55Z")

</div>

You want to know how long someone spends on a particular page?  
Where in this log does it give you that value?

---

<div class="post-metadata">

**Author:** ![mangeshmj1992](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mangeshmj1992](https://discuss.elastic.co/u/mangeshmj1992)\
**Post date:** [December 2, 2021, 2:48pm UTC](https://discuss.elastic.co/t/given-apache-logs-in-es-how-do-i-get-visitor-stay-length-for-each-url/290762/3 "2021-12-02T14:48:26Z")

</div>

Ys it is not there. Is there any way we can derive from above log?  
Or is there way to add this fields from Apache config side?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [December 2, 2021, 3:57pm UTC](https://discuss.elastic.co/t/given-apache-logs-in-es-how-do-i-get-visitor-stay-length-for-each-url/290762/4 "2021-12-02T15:57:45Z")

</div>

You won't get that information from access logs, you need another tool to get this information, maybe a script on the server side of your application or a analytcs tool like Google Analytics, Plausible, Fathom e many others.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 30, 2021, 3:58pm UTC](https://discuss.elastic.co/t/given-apache-logs-in-es-how-do-i-get-visitor-stay-length-for-each-url/290762/5 "2021-12-30T15:58:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
