Track requested objects

Hey,

I was wondering what the best way would be to track how often an object from my database was requested by a user over HTTP (similar to a view count).
I’m not looking for a full analytics dashboard of data over time but I couldn’t find the exact request in the analytics Backendless provides already. I guess simply tracking the request URL would work for me too.

I’m new to tracking of any sort so any hints would be appreciated on the best way I could implement a tracker myself (if I haven’t missed a feature you already provide).
Thanks a lot!

Hi,

Unfortunately, we do not have a ready-made solution out of the box. Empowering analytics is on our roadmap. But so that you don’t have to wait when it’s ready, you can try to do it yourself. To do this, you need to create an async before find event handler for the table and collect the data into some table for analytics. Or even better to collect into a counter (Backendless Counters), and then, once an hour, use a timer to aggregate into a table.
Please let me know if you have any questions regarding the solution that I suggested to you.

Regards,
Stanislaw

Thank you for that quick reply, Stanislaw. I would have to look deeper into counters but it seems to be what I was looking for. Thanks!

Do you have a public roadmap? Would you say this is more a thing of months or weeks until an improvement is released?

I just checked out the counters. I currently request my pages depending on two variables in a where clause that I built with the REST console. That would mean that I have to recreate the request using business logic again in order to increase a counter depending on these two variables, right?

Unfortunately, I cannot commit to any timeframe for delivering this functionality.
The roadmap is not public due to the highly competitive nature of the business.

I just checked out the counters. I currently request my pages depending on two variables in a where clause that I built with the REST console. That would mean that I have to recreate the request using business logic again in order to increase a counter depending on these two variables, right?

You will not need to “re-create” requests. When they get into the event handler, you will have all the information about the request inside it - its params, where-clause, etc., and you simply save the necessary information in another table, and the request itself will go further into the target table and will be executed in the same way as running now. Try to make the simplest handler to begin with, I think you will quickly understand how to work with it, and if not, I will be happy to answer all the questions that arise along the way.

1 Like