piwik release 1.0
[auf_django_piwik.git] / auf / django / piwik / settings.py
1 # -*- coding: utf-8 -*-
2
3
4 from django.conf import settings
5
6 PIWIK_TOKEN = getattr(settings, 'PIWIK_TOKEN', None)
7
8 PIWIK_HOST = getattr(settings, 'PIWIK_HOST', 'piwik.auf.org')
9
10 PIWIK_TRACKCODE = """
11 <!-- Piwik -->
12 <script type="text/javascript">
13 var pkBaseURL = "%(protocol)s://%(host)s/";
14 document.write(unescape("%%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%%3E%%3C/script%%3E"));
15 </script><script type="text/javascript">
16 try {
17 var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", %(token)s);
18 piwikTracker.trackPageView();
19 piwikTracker.enableLinkTracking();
20 }
21 catch( err ) {}
22 </script>
23 <noscript>
24 <p><img src="%(protocol)s://%(host)s/piwik.php?idsite=%(token)s" style="border:0" alt="" /> </p>
25 </noscript>
26 <!-- End Piwik Tracking Code -->
27 """