How to create website analytics?

Hi, I’m trying to create analytics for my site so that I can see how many people are viewing the home page during any given month. I was able to successfully create a workflow that adds a +1 view count every time the home page loads, however I would like to be able to see what the view count is at the beginning of each month.

For example:
April 1st Views: 300
May 1st Views: 1200
June 1st Views: 2500

My first inclination was to create a thing and call it “Analytics”, where it would grab the view count at the 1st of the month at hardcode it into the number, and then display those numbers in a list. I’ve been having difficulty trying to figure out how to schedule something like that at the 1st of the month. Any help would be greatly appreciated.

Many of my apps have first party tracking like you’re referring to but most of it is due to our business model & wanting to own the data itself. It’s not cheap to have especially if your site is high traffic volume. However, Google analytics is free and gets you everything you’re asking about and take 10 min to signup and install.

You can create a scheduled and recursive backend workflow that runs at your desired frequency, or set up a recurring event. In this workflow, you can save the total number of views up to the execution date and also calculate the difference between the total views and the total views from the previous period. This way, you wouldn’t need to calculate anything on the frontend.

This would be one approach using only Bubble. However, as @chris.williamson1996 suggested, the best solution would be to use a dedicated tool like Google Analytics. Recently, I used PostHog, which is a bit more complex but very comprehensive and has excellent integration with Bubble.