All Projects → tomdyson → Wagalytics

tomdyson / Wagalytics

Licence: mit
A Google Analytics dashboard in your Wagtail admin

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Wagalytics

Instantanalytics
DEPRECATED Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
Stars: ✭ 103 (-41.48%)
Mutual labels:  google-analytics
Wagtailmedia
A Wagtail module for managing video and audio files within the admin
Stars: ✭ 128 (-27.27%)
Mutual labels:  wagtail
Django Salesman
Headless e-commerce framework for Django.
Stars: ✭ 157 (-10.8%)
Mutual labels:  wagtail
Awesome Wagtail
A curated list of awesome packages, articles, and other cool resources from the Wagtail community.
Stars: ✭ 1,527 (+767.61%)
Mutual labels:  wagtail
Wagtail
A Django content management system focused on flexibility and user experience
Stars: ✭ 11,387 (+6369.89%)
Mutual labels:  wagtail
Laravel Analytics Event Tracking
Laravel package to easily send events to Google Analytics
Stars: ✭ 137 (-22.16%)
Mutual labels:  google-analytics
Appmetrics.js
A small (< 1kb) library for measuring things in your web app and reporting the results to Google Analytics.
Stars: ✭ 1,383 (+685.8%)
Mutual labels:  google-analytics
Consumerfinance.gov
Django project protecting American consumers
Stars: ✭ 164 (-6.82%)
Mutual labels:  wagtail
Curatedseotools
Best SEO Tools Stash
Stars: ✭ 128 (-27.27%)
Mutual labels:  google-analytics
Komito
🔖 Komito Analytics is a free, open-source enhancement for the most popular web analytics software.
Stars: ✭ 148 (-15.91%)
Mutual labels:  google-analytics
Hugo Nederburg Theme
Nederburg is a fast and secure hugo theme and is a port of the Tracks WP theme
Stars: ✭ 107 (-39.2%)
Mutual labels:  google-analytics
React G Analytics
React google analytics with support for react-router
Stars: ✭ 116 (-34.09%)
Mutual labels:  google-analytics
Vue Ga
Google Analytics for Vue.js
Stars: ✭ 141 (-19.89%)
Mutual labels:  google-analytics
Crmint
Reliable data integration & processing for advertisers
Stars: ✭ 106 (-39.77%)
Mutual labels:  google-analytics
Save Analytics From Content Blockers
A proxy back end for Google Tag Manager & Google Analytics
Stars: ✭ 159 (-9.66%)
Mutual labels:  google-analytics
Wagtailtrans
A Wagtail add-on for supporting multilingual sites
Stars: ✭ 103 (-41.48%)
Mutual labels:  wagtail
Cloudflare Workers Async Google Analytics
☁️ The Cloudflare Workers implementation of an async Google Analytics
Stars: ✭ 135 (-23.3%)
Mutual labels:  google-analytics
Angulartics
Analytics for AngularJS applications.
Stars: ✭ 1,966 (+1017.05%)
Mutual labels:  google-analytics
Dot Hugo Documentation Theme
Dot - Hugo Documentation Theme
Stars: ✭ 162 (-7.95%)
Mutual labels:  google-analytics
Vue Analytics
Google Analytics plugin for Vue
Stars: ✭ 1,780 (+911.36%)
Mutual labels:  google-analytics

Wagtail Analytics

(Last Updated 12/17/19 for Wagtail v2.x)

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

Screenshot

Screenshot

Instructions

  1. Create a service account and download the JSON key (Credentials > Create Credentials > API 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 (Admin > User Management)
  4. Find the ID for your Google Analytics property (Admin > Property > View Settings, note: this is NOT the key that begins with "UA-")
  5. Store your JSON key somewhere safe, and do not check it into your repo
  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'

or when using environment variables (e.g. Heroku):

  • GA_KEY_CONTENT = 'content_of_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.

Ensure that your code snippet is included on each page you want to be tracked (likely by putting it in your base.html template.) (Admin > Property > Tracking Code)

Multisite Support

To enable multisite support you'll need to update your Wagalytics settings and have wagtail.contrib.settings installed. Sites can use a GA_KEY_FILEPATH or a GA_KEY_CONTENT key, but it's best not to use both.

In the snippet below, you'll see site_id. This is the ID (Primary Key) of your Wagtail Site.

# Use either the GA_KEY_FILEPATH or the GA_KEY_CONTENT setting on your sites,
# but don't use both
WAGALYTICS_SETTINGS = {
    site_id: {
        'GA_VIEW_ID': 'ga:xxxxxxxx',
        'GA_KEY_FILEPATH': '/path/to/secure/directory/your-key.json',
    },
    site_id: {
        'GA_VIEW_ID': 'ga:xxxxxxxx',
        'GA_KEY_CONTENT': 'content_of_your_key.json',
	}
}

For every Wagalytics site you add in your multisite WAGALYTICS_SETTINGS you'll need to make sure you have the proper GA View ID and API Key. One View ID and API Key won't work for all your sites automatically.

Here's a working example of multisite WAGALYTICS_SETTINGS:

WAGALYTICS_SETTINGS = {
	# My default site. 2 is the site ID. This one uses GA_KEY_FILEPATH.
    2: {
        'GA_VIEW_ID': 'ga:xxxxxxxx',
        'GA_KEY_FILEPATH': '/path/to/secure/directory/your-key.json',
    },
    # The secondary site. 3 is the Site ID. This one uses GA_KEY_CONTENT.
    3: {
        'GA_KEY_CONTENT': 'content_of_your_key.json',
        'GA_VIEW_ID': 'ga:xxxxxxxx',
    }
}

Wagalytics Developers

Developers will need to carry out the following steps after cloning wagalytics:

  • Ensure NodeJS & NPM are installed
  • Run npm install then npm run build in the top level wagalytics directory

You will need to run npm run build anytime the javascript source is updated.

TODO

  • [ ] allow configuration of results
  • [x] better styling, e.g. using chart.js
  • [ ] Throw an error if the relevant settings aren't available
  • [x] 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
  • Stefan Schärmeli
  • Alex Gleason
  • James Ramm
  • Jake Kent
  • Kalob Taulien
  • Julius Parishy
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].