added piwik support
This commit is contained in:
parent
78dbd2c8d8
commit
8fe1015729
@ -75,3 +75,7 @@ LOAD_CONTENT_CACHE = True
|
|||||||
# disable tags
|
# disable tags
|
||||||
TAGS_SAVE_AS = ''
|
TAGS_SAVE_AS = ''
|
||||||
TAG_SAVE_AS = ''
|
TAG_SAVE_AS = ''
|
||||||
|
|
||||||
|
# PIWIK
|
||||||
|
PIWIK_URL = 'piwik.luftmentsh.org'
|
||||||
|
PIWIK_SITE_ID = 5
|
||||||
|
@ -1,16 +1,46 @@
|
|||||||
{% if GOOGLE_ANALYTICS %}
|
{% if GOOGLE_ANALYTICS %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var _gaq = _gaq || [];
|
||||||
var _gaq = _gaq || [];
|
_gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']);
|
||||||
_gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']);
|
_gaq.push(['_trackPageview']);
|
||||||
_gaq.push(['_setDomainName', '{{ DOMAIN }}']);
|
(function() {
|
||||||
_gaq.push(['_trackPageview']);
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||||
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
(function() {
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
})();
|
||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
</script>
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
{% endif %}
|
||||||
})();
|
{% if GAUGES %}
|
||||||
|
<script type="text/javascript">
|
||||||
</script>
|
var _gauges = _gauges || [];
|
||||||
|
(function() {
|
||||||
|
var t = document.createElement('script');
|
||||||
|
t.type = 'text/javascript';
|
||||||
|
t.async = true;
|
||||||
|
t.id = 'gauges-tracker';
|
||||||
|
t.setAttribute('data-site-id', '{{GAUGES}}');
|
||||||
|
t.src = '//secure.gaug.es/track.js';
|
||||||
|
var s = document.getElementsByTagName('script')[0];
|
||||||
|
s.parentNode.insertBefore(t, s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
||||||
|
<script type="text/javascript">
|
||||||
|
{% if PIWIK_SSL_URL %}
|
||||||
|
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
|
||||||
|
{% else %}
|
||||||
|
var pkBaseURL = "{{ PIWIK_URL }}";
|
||||||
|
{% endif %}
|
||||||
|
var _paq = _paq || [];
|
||||||
|
_paq.push(["trackPageView"]);
|
||||||
|
_paq.push(["enableLinkTracking"]);
|
||||||
|
(function() {
|
||||||
|
var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/";
|
||||||
|
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||||
|
_paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
|
||||||
|
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||||
|
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
@ -105,6 +105,11 @@
|
|||||||
|
|
||||||
</div><!-- container -->
|
</div><!-- container -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Include other templates
|
||||||
|
=============================================== -->
|
||||||
|
{% include 'analytics.html' %}
|
||||||
|
|
||||||
<!-- End Document
|
<!-- End Document
|
||||||
================================================== -->
|
================================================== -->
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user