- What Grafana version and what operating system are you using?
Grafana v8.0.3 (cae5c5e46b) in Docker / Kubernetes
- What are you trying to achieve?
Use Google Analytics integration to track dashboard usage.
- How are you trying to achieve it?
I setup a Google Analytics property with Universal Analytics, got the tracking code from there, then configured our
Deployment to inject an environment variable
- What happened?
The configuration works in as far as I can see requests to
google-analytics.com when loading the pages and I can see data in Google Analytics, but only for full page loads. I.e. it doesn’t work when navigating from the initial page to any other page or dashboard.
In developer tools, on full page load (whether root or direct into any dashboard) I can see the request to GA:
But not when navigating to another dashboard from there:
- What did you expect to happen?
We were hoping to use this to get information on which dashboards are being used and which aren’t. I’m not sure if this is a bug or if it’s how this is supposed to work but it doesn’t work for my use-case.
- Can you copy/paste the configuration(s) that you are having problems with?
As mentioned the only configuration change is starting Grafana with the
GF_ANALYTICS_GOOGLE_ANALYTICS_UA_ID=UA-XXXXXXXX-X env variable set.
- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
- Did you follow any online instructions? If so, what is the URL?
No, just the docs for the config - Configuration | Grafana Labs