]> git.parisson.com Git - teleforma.git/commitdiff
add google analytics tools
authoryomguy <yomguy@parisson.com>
Mon, 9 Jul 2012 11:46:15 +0000 (13:46 +0200)
committeryomguy <yomguy@parisson.com>
Mon, 9 Jul 2012 11:46:15 +0000 (13:46 +0200)
example/settings.py
teleforma/templates/telemeta/base.html

index c2a1d270f820a172b90949c9516c4aea8a1e43bf..c6c4150533a3c65bb851332d3b75e8b298cf8980 100644 (file)
@@ -145,6 +145,7 @@ INSTALLED_APPS = (
     'timezones',
     'jqchat',
 #    'follow',
+    'googletools',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
index a533dfe02c971c13e7e83418d958aba8ebf01d06..66e1aa8f7fcd1783d8c73d85bdf2b24bc2463a84 100644 (file)
@@ -2,6 +2,7 @@
 {% load i18n %}
 {% load telemeta_utils %}
 {% load teleforma_tags %}
+{% ifloaded "googletools" %}{% load googletools %}{% endifloaded %}
 {% get_current_language as LANGUAGE_CODE %}
 {% get_available_languages as LANGUAGES %}
 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
@@ -171,8 +172,12 @@ alt="logo" />
 {% endblock layout %}
 
 {% block analytics %}
+{% ifloaded "googletools" %}
+{% analytics_code %}
+{% endifloaded %}
 {% endblock analytics %}
 
 <script type='text/javascript'>window.scrollTo(0, 1);</script>
+
 </body>
 </html>