Send perfomance data to Google Analytics, you can view it in Content > Site Speed > User Timings.
Heavily inspired by Garelic Rails gem by Jan Suchal.
-
Download
pip install git+https://github.com/junckritter/gadjango
-
Add middleware to your settings
MIDDLEWARE_CLASSES = ( 'gadjango.middleware.TimingMiddleware', ... ... )
-
Add GADjango to INSTALLED_APPS
INSTALLED_APPS = ( ..., gadjango, ..., )
-
Include timing.html template into Google Analytics JavaScript element
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); _gaq.push(['_setSiteSpeedSampleRate', 100]); _gaq.push(['_trackPageview']); {% include "gadjango/timing.html" %} (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>