Adds Piwik Analytics Provider
This commit is contained in:
parent
ff69d3fc38
commit
2da62d449d
3 changed files with 15 additions and 0 deletions
|
@ -106,6 +106,9 @@ JB :
|
|||
site_id :
|
||||
mixpanel :
|
||||
token : '_MIXPANEL_TOKEN_'
|
||||
piwik :
|
||||
baseURL : 'myserver.tld/piwik' # Piwik installation address (without protocol)
|
||||
idsite : '1' # the id of the site on Piwik
|
||||
|
||||
# Settings for sharing helper.
|
||||
# Sharing is for things like tweet, plusone, like, reddit buttons etc.
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
{% include JB/analytics-providers/getclicky %}
|
||||
{% when "mixpanel" %}
|
||||
{% include JB/analytics-providers/mixpanel %}
|
||||
{% when "piwik" %}
|
||||
{% include JB/analytics-providers/piwik %}
|
||||
{% when "custom" %}
|
||||
{% include custom/analytics %}
|
||||
{% endcase %}
|
||||
|
|
10
_includes/JB/analytics-providers/piwik
Executable file
10
_includes/JB/analytics-providers/piwik
Executable file
|
@ -0,0 +1,10 @@
|
|||
<script type="text/javascript">
|
||||
var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ site.JB.analytics.piwik.baseURL }}/" : "http://{{ site.JB.analytics.piwik.baseURL }}/");
|
||||
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script><script type="text/javascript">
|
||||
try {
|
||||
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {{ site.JB.analytics.piwik.idsite }});
|
||||
piwikTracker.trackPageView();
|
||||
piwikTracker.enableLinkTracking();
|
||||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://{{ site.JB.analytics.piwik.baseURL }}/piwik.php?idsite={{ site.JB.analytics.piwik.idsite }}" style="border:0" alt="" /></p></noscript>
|
Loading…
Add table
Reference in a new issue