Tracking page load views

I would like to track page load views on a particular page.

I have created a datatype called “Visitor” which has a field called visitor-count, of type number. Here each time the page is loaded, I increment it by one. So now I have a count say of 20 as in this appdata tab.
Here is what the data shows.
image

On that page or possibly on some other page,
I added a group of type Visitor
Inside it I add a text field to show this Visitor-count number.
image
But nothing appears, no matter on what page I put it.
Must be simple, what am I doing wrong?

1 Like

Hi there, @accts… I know you said the group has a type of content of Visitor, but does the group have a data source? If it doesn’t, that’s your issue. If it does, what is the data source?

Best…
Mike

Hey @mikeloc,
Does this feature make sense with the current pricing policy? Making calls to the database on every page load can be costly, no?

1 Like

Fair question for sure in the brave new world, @Eugene_West, and the answer on this one is almost certainly no (i.e., it doesn’t make sense), given that Bubble themselves mentioned in the webinar that one way to optimize is to simply not do things that Bubble isn’t great at doing (such as tracking page views instead of using Google Analytics to do that).

1 Like

The group has the same data type Visitor, but I had put visitor:last item. When I changed it to :first item, it is working.
Thanks.

As to not looking at this parameter, what is wrong with that? It does give an indication of activity, if you are sitting in the dark and absolutely no one is visiting.

There is nothing wrong with what you are doing, but it could be an expensive feature when you consider the pricing change to workload units.

That’s true.

Is there a cost to this action? I was not aware. Where might see the charge description.