Skip to content

Instantly share code, notes, and snippets.

@sweeneyrobb
Created November 28, 2015 19:53
Show Gist options
  • Save sweeneyrobb/2ffcdee1cdec26ca9b4b to your computer and use it in GitHub Desktop.
Save sweeneyrobb/2ffcdee1cdec26ca9b4b to your computer and use it in GitHub Desktop.
A Jekyll include file for integrating a site with clicky.com. Enjoy!
<script type="text/javascript">
var clicky_site_ids = clicky_site_ids || [];
clicky_site_ids.push({{ include.trackingid }});
(function() {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = '//static.getclicky.com/js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s);
})();
</script>
<!-- To use simply add the following tag to a desired processed Jekyll file.
Note: This is most effective if added to a base layout.
{% include clicky.html trackingid="{replace-with-your-clicky-tracking-id" %}
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment