Visualize website usage by users

Goal: I want to create a dashboard which shows user requests made to my website. For this, I created a filter in my java web-app and started capturing user requests and storing them in an ES index. The document is in the form of:
{
'user': 'user1',
'url': 'domain.com/page1',
'hitcount': 12
}
So, now I have an index which contains the information as to how many times a user requested which URLs.
Now, I want to create visualizations to show usage trends per user.

Question:

  1. Which visualizations should be used for this use-case?
  2. If I need to show the change in user-trends over time, how should I save the data? For e.g. is there a visualization where I could show, that a user has stopped/reduced requesting a page and now accesses a different page more frequently.

Any direction will be helpful.
Note: I understand, this could be done with grafana + prometheus, but I wish to do this with elastic stack.

hi @BlueSpirit,

that should be fairly easy to do in Kibana.

for (1): you can use the date-histogram to show these trends over timte (bar chart, line chart, ...). You would split by terms as a sub-aggregation, where a term is the user-field. For the metric, select sum of all hitCounts.

for (2): nest another term sub-aggregation for the url field, which will group your data for each user for each url. Then, when you filter down to a specific user (e.g. by filtering on the user-field for a specific value, you can track the behavior of the user for all pages over time.

Hi @thomasneirynck,
Thanks for the reply. Currently, I have bar and pie charts. where splitting criteria is done on user and url. Also, I created tag-cloud charts to show top-5 URLs and top-5 users.

Also, should I change the way we store this data. As in, should I save each request individually and then create charts on aggregated data. Only concern is the space it will take.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.