1.2
[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 PIWIK_HTTPFORCE = getattr(settings, 'PIWIK_HTTPFORCE', False)
8 PIWIK_HOST = getattr(settings, 'PIWIK_HOST', 'auf.stats.mysnip-hosting.de')
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>
16 <script type="text/javascript">
17 try {
18 var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", %(token)s);
19 piwikTracker.trackPageView();
20 piwikTracker.enableLinkTracking();
21 }
22 catch( err ) {}
23 </script>
24 <noscript>
25 <p><img src="%(protocol)s://%(host)s/piwik.php?idsite=%(token)s" style="border:0" alt="" /> </p>
26 </noscript>
27 <!-- End Piwik Tracking Code -->
28 """