1.1
[auf_django_piwik.git] / auf / django / piwik / settings.py
CommitLineData
567ee8ed
OL
1# -*- coding: utf-8 -*-
2
3
4from django.conf import settings
5
6PIWIK_TOKEN = getattr(settings, 'PIWIK_TOKEN', None)
7
b9d57605 8PIWIK_HOST = getattr(settings, 'PIWIK_HOST', 'auf.stats.mysnip-hosting.de')
567ee8ed
OL
9
10PIWIK_TRACKCODE = """
11<!-- Piwik -->
12<script type="text/javascript">
13 var pkBaseURL = "%(protocol)s://%(host)s/";
b9d57605
OL
14 document.write(unescape("%%3Cscript src='%(static)spiwik/piwik.js' type='text/javascript'%%3E%%3C/script%%3E"));
15</script>
16<script type="text/javascript">
567ee8ed
OL
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"""