Grafana Docker container and Google Analytics

How easy is adding Google Analytics support to Grafana Docker container?

It's trivial.

Just add an environment variable to the Grafana container:

GF_ANALYTICS_GOOGLE_ANALYTICS_UA_ID=[YOUR_UA_ID]

Where:

  • YOUR_UA_ID is your Google Analytics UA ID code e.g. UA-123123123-1

Of course, it will require container restart.

NOTICE

If you are using Ad Block plugin (like I do) you will have to disable it for your domain in order to test Google Analytics.