blackcowmoo / grafana-google-analytics-datasource

Grafana Google Analytics datasource
https://grafana.com/grafana/plugins/blackcowmoo-googleanalytics-datasource/
Apache License 2.0
35 stars 15 forks source link

[BUG] Wrong time filter #108

Open pedrosodre opened 5 months ago

pedrosodre commented 5 months ago

Describe the bug I've created a panel on Grafana to get total website sessions, but when I select on Grafana something like "Last 6 hours" and current time is 03 AM, it counts entire last day.

Grafana Version & Plugin Version Grafana 10.3, Plugin 0.2.3

To Reproduce Create a simple panel using any metric and select some date time that get part of one day.

Expected behavior It should get/count values only from selected time.

Screenshots image

lcc3108 commented 5 months ago

Google analytics api does not support a specific time. It needs to be handled at the plugin level.

The behavior is definitely not intuitive (in the past I think I thought it was okay to bring in a lot of data though)

Intuitively, we will proceed with modifying it to display only the data within that time. However, the user must set the time dimension well. ex) If you set it to 6 hours and then set the time dimension to day, there may be no data.