Hello,

I am trying to get dashboard usage statistics by users. I am looking to collect the following statistics:

  1. No. of views of the dashboard per user
  2. No. of filter changes in the dashboard

I found 1) in the events table in the Redash RDS with the following query:

select * from events where object_type='dashboard' and action='view' order by created_at desc

where object_id corresponds to the dashboard_id.

I am having a hard time finding 2). Do you have any tips on where I could get that information?

Best,
Piero

To clarify, do you mean filters or parameters? Filters are part of the front-end; they won’t appear in the server logs. Parameters OTOH do hit the server so that would show up in the events table.

Hey @jesse thanks for the quick response. Let’s say I want to merge a OSS contribution to add filter changes to the events table. Can you give me some pointers?

Also it seems that filters modify the url of the dashboard, but does that not ultimately lead to a query being executed in the backend and thus should show up in the logs somewhere?

I am willing to parse the logs if needed.

The approach I would take:

  1. Write an API endpoint to capture filter changes
  2. Add a hook to the filter widget onChange that logs the update to said API endpoint
  3. Mask all of this behavior behind an environment variable, off by default, since it’s a narrow use case.

The nuts and bolts of development are easy enough. We have instructions to set up a development environment with Docker.

Lots of our OSS users write their own extensions and behaviors. Not all of them make it into the OSS release. But the team is happy to review PR’s.

GLHF :muscle:

Great! I’ll try that. Also where are the parameter changes captured in the events table?

@jesse:

I ran the following experiment. I refreshed a dashboard after changing the parameter MC # in the dashboard (which is also a parameter in the queries).

I checked the events table as follows:

select created_at, additional_properties, object_type, action, additional_properties::json -> 'user_name' user_name
from events order by created_at desc limit 10

I do not see any events being inserted in the DB after taking that action. Am I misunderstanding your reply?

The query re-executes whenever you apply a parameter change. That execution will appear in the logs, including the parameter values passed by the user.

Hello!

I am trying to access Redash’s DB but the events table on Redash RDS seems empty for me.

All the other tables have data in them except for this events table. I want to track the dashboard usage so would like to use this table. Do you know why this might be happening?

Let me know if I am missing something here. Thank you!

Since I’m switched to V9 (last week) I’ve got the same issue;

Is there something to activate in the configuration ?