https://github.com/careydevelopment/analytics
Library that handles persistence and retrieval of analytics info for a Spring Boot-powered blog that uses MongoDB.
https://github.com/careydevelopment/analytics
java-11 mongodb spring-boot
Last synced: about 2 months ago
JSON representation
Library that handles persistence and retrieval of analytics info for a Spring Boot-powered blog that uses MongoDB.
- Host: GitHub
- URL: https://github.com/careydevelopment/analytics
- Owner: careydevelopment
- License: mit
- Created: 2021-07-17T18:49:22.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-27T08:39:57.000Z (almost 5 years ago)
- Last Synced: 2025-03-29T08:28:27.484Z (over 1 year ago)
- Topics: java-11, mongodb, spring-boot
- Language: Java
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Analytics Library
 

[](https://search.maven.org/artifact/us.careydevelopment.util/analytics/1.7.0-RELEASE/jar)
Handles analytics for the [Carey Development Blog](https://careydevelopment.us). It can also be used to handle analytics for other blogs powered by Spring Boot with MongoDB.
## Persisting Analytics
The library persists analytics info whenever a visitor hits a page. The code logs the time of the visit, the URL of the page, its title and other important
info.
Each visit get persisted as a new (small) document in a collection that holds nothing but analytics info.
It's best to persist the analytics in a collection that's in the same database as the blog itself. However, analytics could be stored in separate
databases as well.
## Retrieving Analytics
This library also handles retrieval of analytics info for display in admin consoles.
It's up the application that uses this dependency to implement a solution for displaying the data.
## Service Layer
Almost all the fun stuff happens in [BaseWebPageVisitService](https://github.com/careydevelopment/analytics/blob/main/src/main/java/us/careydevelopment/util/analytics/service/BaseWebPageVisitService.java). So that's where you should turn your attention if you're interested in using this library.
## Latest Release
You can pull it from the central Maven repositories:
```xml
us.careydevelopment.util
analytics
1.7.0-RELEASE
```
## License
This code is under the [MIT License](https://github.com/careydevelopment/analytics/blob/main/LICENSE).