Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional analytics #72

Closed
dixonge opened this issue Mar 27, 2012 · 3 comments
Closed

Additional analytics #72

dixonge opened this issue Mar 27, 2012 · 3 comments

Comments

@dixonge
Copy link

dixonge commented Mar 27, 2012

It would be nice to have a built-in handler for Piwik

(http://piwik.org)

@hwinkel
Copy link

hwinkel commented Apr 13, 2012

+1

1 similar comment
@cnlpete
Copy link

cnlpete commented Apr 17, 2012

+1

@s17t
Copy link

s17t commented May 13, 2012

You can use custom analytic provider.

  • create file _includes/custom/analytics
  • put this in it:
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ site.JB.analytics.custom.url  }}" : "http://{{ site.JB.analytics.custom.url  }}");
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.custom.site_id  }} );
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://{{ site.JB.analytics.custom.url }}/piwik.php?idsite={{ site.JB.analytics.custom.site_id }}" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
  • in _config.yml use this in the analytic configuration. The 'url' parameter mustn't contains 'http://' or 'https://'.
analytics :
    provider : custom
    custom:
        url: 's17t.net/stats/'
        site_id: '1'

@dixonge dixonge closed this as completed May 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants