Login

Tag "google-analytics"

Snippet List

Google Analytics noscript tracking

Method which gets a chunk of HTML to perform standard Google Analytics tracking as well as a noscript version. Very useful for finding out what percentage of your users do not have JavaScript support. This is Python port of the PHP example here: [http://andrescholten.net/google-analytics-zonder-javascript/](http://andrescholten.net/google-analytics-zonder-javascript/) To use, you need to put the following into your settings file: GOOGLE_ANALYTICS_ID = 'UA-1234567-1' GOOGLE_ANALYTICS_DOMAIN = 'example.com'

  • google-analytics
  • noscript
Read More

Google Analytics Templatetag

This template tag allows easy inclusion of google analytics script. If Google changes the script in the future, it remains easy to update the template tag with the the new code. This script is tested against Django 1.0 trunk Oct 9 2008. **Readme** After signing up for a Google Analytics account for your domain, define ANALYTICS_ID = "UA-XXXXXXX-X" in your settings.py with the supplied code. Include {% load analytics %} at the top of your base.html and {% analytics %} tag at just before the closing 'body' tag of the base template. Make a template to hold the analytics script. templates/analytics/analytics_html

  • templatetag
  • google-analytics
  • django-1.0
Read More

2 snippets posted so far.