---
title: "Discussion on \"Anonymized Website Visitor Counter in Laravel\" | Hashnode"
description: "Discussion on \"Anonymized Website Visitor Counter in Laravel\". Building a middleware to count unique visitor count in your Laravel application"
url: "https://hashnode.com/posts/anonymized-website-visitor-counter-in-laravel/604ce5e037d84907f132821d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Anonymized Website Visitor Counter in Laravel](https://blog.dzarsky.eu/anonymized-website-visitor-counter-in-laravel?utm_source=hashnode&utm_medium=feed)

Building a middleware to count unique visitor count in your Laravel application

Mar 13, 2021 · 7 min read · blog.dzarsky.eu  
Updated Mar 15, 2021  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)
-   [#statistics](https://hashnode.com/tag/statistics)

## Written by

[Dominik Zarsky](https://hashnode.com/@loupeznik)

@loupeznik · Czech Republic

  
[View profile](https://hashnode.com/@loupeznik)

Web development, DevOps, Cloud, Linux

## Responses 1

Markdown supported · ⌘↵ to post

[Tommy Hoang](https://hashnode.com/@tommyhoang)

[Jul 2, 2021](https://hashnode.com/posts/anonymized-website-visitor-counter-in-laravel/604ce5e037d84907f132821d/comment/60deeddd03707d644a4fe295)

Thanks for your short description. It makes me easy to understand website counter. A newbie question, why do you hash the IP?

[Dominik Zarsky](https://hashnode.com/@loupeznik)

[Jul 2, 2021](https://hashnode.com/posts/anonymized-website-visitor-counter-in-laravel/604ce5e037d84907f132821d/comment/60deeddd03707d644a4fe295#reply-60df1c7403707d644a4fe821)

Glad you found the article helpful. As to the IP hashing, I wanted to demonstrate a way one can anonymize collected user-identifying data (in this case the IP addresses). Hashing the values ensures the record's uniqueness as if one stored them in plaintext, but keeps our users somewhat anonymous.
