Handles analytics for the Carey Development Blog. It can also be used to handle analytics for other blogs powered by Spring Boot with MongoDB.
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.
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.
Almost all the fun stuff happens in BaseWebPageVisitService. So that's where you should turn your attention if you're interested in using this library.
You can pull it from the central Maven repositories:
<dependency>
<groupId>us.careydevelopment.util</groupId>
<artifactId>analytics</artifactId>
<version>1.7.0-RELEASE</version>
</dependency>
This code is under the MIT License.