# Tracking visits {#tracking-visits}


One of the most interesting features in Shlink is the visits tracking.

Shlink will track every time your short URLs are opened, and then try to geolocate the visitor.


## Considerations {#considerations}


In order to geolocate visits, Shlink makes use of a [GeoLite2](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/) database, by [MaxMind](https://www.maxmind.com), which is used to match the location of the visitor's IP address.

To make sure your GeoLite2 db is always up-to-date, you will have to [configure your own license key](https://sourcey-shlink.pages.dev/documentation/geolite-license-key/index.md).

Also, Shlink will make sure you fulfil most data protection regulations, by storing only an anonymized version of the visitor's IP address (unless deliberately opting-out of this behavior).


## Orphan visits {#orphan-visits}


Starting with v2.6.0, Shlink can also track visits to any URL that would usually result in a "404 - Not found" error, also known as **orphan visits**.

These visits can have one of these types:

- `base_url`: Someone opened the base URL in which Shlink is hosted.
- `invalid_short_url`: Someone opened a short-url-like URL, but it did not resolve an existing short URL, or it was disabled.
- `regular_404`: Someone opened a route which Shlink didn't understand.

The visits will be tracked both if you configure [special redirects](https://sourcey-shlink.pages.dev/documentation/advanced/special-redirects/index.md) from those three cases, but also if you leave Shlink serve a regular 404 status with a "Not found" template.

In case you don't need this, you can opt out from orphan visits tracking via [env vars](https://sourcey-shlink.pages.dev/documentation/environment-variables/index.md#visits-tracking) or [installation tool's](https://sourcey-shlink.pages.dev/documentation/command-line-interface/installation-tool/index.md) config options.


## Disable tracking {#disable-tracking}


Since v2.7.0, Shlink provides a more granular way to disable visits tracking, either completely or partially.

Via configuration or [env vars](https://sourcey-shlink.pages.dev/documentation/environment-variables/index.md#visits-tracking), you will be able to:

- Completely disable tracking: All short URLs will display they had **0** visits.
- Disable IP address tracking: The visits will be counted, but they will all show they come from an **unknown** location.
- Disable referrer tracking: All visits will be counted and located, but Shlink will not track the **referrer**.
- Disable user agent tracking: All visits will be counted and located, but Shlink will not track the **user agent**.
