Skip to content

A Google Analytics dashboard in your Wagtail admin

Notifications You must be signed in to change notification settings

neon-jungle/wagalytics

 
 

Repository files navigation

Wagtail Analytics

This module provides a simple dashboard of Google Analytics data, integrated into the Wagtail admin UI. Tested on Wagtail 1.4+.

Screenshot

Screenshot

Instructions

  1. Create a service account and download the JSON key
  2. Make sure the Analytics API is enabled for your project (See issue 2)
  3. Add the service account email address as a read-only user in Google Analytics (account > property > user management)
  4. Find the ID for your Google Analytics property
  5. Store your JSON key somewhere safe
  6. pip install wagalytics
  7. Add 'wagalytics' to your INSTALLED_APPS
  8. Add 'wagtailfontawesome' to INSTALLED_APPS if it's not there already
  9. Update your settings:
  • GA_KEY_FILEPATH = '/path/to/secure/directory/your-key.json'
  • GA_VIEW_ID = 'ga:xxxxxxxx'

If you get CryptoUnavailableError errors, you probably need to pip install PyOpenSSL and/or pip install pycrypto. See StackOverflow.

TODO

  • allow configuration of results
  • better styling, e.g. using chart.js
  • Throw an error if the relevant settings aren't available
  • add per-page results

Notes

This module doesn't help with recording user activity. See the Wagtail docs and StackOverflow for pointers on how to avoid gathering data during preview and testing.

Contributors

Thijs Kramer

About

A Google Analytics dashboard in your Wagtail admin

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 60.9%
  • HTML 39.1%