Analytics Chart Issue

Hello everyone,

I’m boulding my web mobile app and I’m stuck on one point.
I would like to create an Analytics section where my users (only the one logged-in) can see how many views and likes (in two different chart) they get by day, week and month.
I have already created a database where all the views or likes are saved, but the problem is that on the chart I can only see the total… because when someone view or like the profile it increment by +1 on my user database but it doesen’t save the day when someone view or like the profile.
Any suggestion on how I can solve it?
The views cont and likes count are on my user database… I shoul create a different thing?
Thanks in advance if someone can help with that!
Below some pics to help to understand my issue:


You seem very close. Are you making one record per person per day and adding views and likes to that record? If not, that’s the way to go.

I’m not sure if I understood what you mean…
On my database I got my data type ‘’ user ‘’ the one already built into bubble and on that type I store all my user information, included views and likes…and I created two more fields, one called Date of View and another one Date of like.
When I run my user profile test and I go on the analytics section of my user, on the chart it only shows the total number of views or likes… I got a dropdown element where the current user can choose between day, week, and month but it doesn’t work… when on the chart I select ‘’ week ‘’ for example, the chart disappears.
For example, that’s how I managed the workflow for the views count:
Profile page load → make change to user
–>Views = This user views + 1
–>Date of view = current date/time
I think that doing so it only saves the last time when someone viewed the profile… that’s why the chart shows only the total.
But I don’t know how to solve it…
I need something like: when the page is loaded the number of views will increment by +1 and I need to save the de date when it happens.
I also tried to create another type on my database to store only that elements, but doing so on the chart shows the total of views of all my users.
I’m getting crazy trying to solve it.

Few things:

  1. You need a separate custom data type for analytics.
  2. Create a new record for each user (if it doesn’t exist for the day & assuming you want daily stats as the lowest count)
    3 Create these field types- user, date, views, likes.
    4 Continue with the workflows of adding views and likes as long as it is for the user and the day.
    5 Use these records with user as constraint and “group by” date to show daily, weekly and monthly stats.

Many thanks for your help.
As I said I tried to create another type… but when on the chart I select data source —> group by… it’s select all my users and on the chart shows the total of views or likes of all my users.
Maybe my problem is obvious but I’m new in bubble… I’m trying to understand.

Did you use constraint of User=current user in Do a search for stats?

Also, was your user field a user and not text?

All my users have a unique username.
When a new user subscribes, the slug of the user changes with his username.
And for example, it becomes from
http://name of the app/current page/unique id
http://name of the app/current page/username.
So all the pages of the app get data from the URL.
On the profile page, I got an auto-fill input (current date/time) that save it when the page is loaded.
Page load → Make a change to User
Views = Current user Views +1
Data Views = Input current data/time 's value

Under the chart, there is a dropdown with values today, past week, past month.

On the analytics page on the chart I got:

Search for users → User
Username = get the path from page URL
Views = Current user Views
Data Views = Current user Data views
( for example) Only when the dropdown value is ‘’‘past week’’
Data source → search for user
Username(Slug) = get data from page URL
Views = Current user views
Data Views = Current user Data Views :(+days) -7

And when I run the page on the chart shows the total of Views.
But when I run the page and I select ‘’ past week ‘’ from the chart, the chart disappears.

I also tried to create a new data type were called All User Views where all the views of my users are saved… with the fields Views and Username.
Every time that the profile page is load that how I managed the workflow:
Page load → Make a change to User
Views = Current user Views +1
Data Views = Input current data/time 's value

Page load → Create a new thing (All User Views)
Username = get phat from page URL
Views = Result from step one (make a change to the user) ’ Views

And on the database, it works because it saves the unique username and the total number of the views and it also saves the creation date (page is load).

So on the chart, I tried:
Type of data → grouping
Data source: do a search for All Users Views grouping by, username, views, creation date.
When I run the page on the chart shows the total of views of all my Users.

So both ways are wrong.