Sha256: bbd0761ed526e065acecd4eeaf929d2c25588218eec6e0594858ba510d015184

Contents?: true

Size: 1.31 KB

Versions: 13

Compression:

Stored size: 1.31 KB

Contents

{% comment %}
<!--
Example code for using Matamo as alternative analytics solution.
-->
{% if site.matomo_analytics %}
<script>
  var _paq = _paq || [];

  {% if site.matomo_analytics.no_cookies %}
  _paq.push(['disableCookies']);
  {% endif %}

  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  _paq.push(['setTrackerUrl', u+'piwik.php']);
  _paq.push(['setSiteId', '{{site.matomo_analytics.site_id}}']);

  var pushStateEl = document.getElementsByTagName('hy-push-state')[0];
  var timeStartLoadPage, referer, timeItTookToLoadPage;

  pushStateEl.addEventListener('hy-push-state-start', function() {
    timeStartLoadPage = new Date().getTime();
    referer = window.location.toString();
  });

  pushStateEl.addEventListener('hy-push-state-ready', function() {
    timeItTookToLoadPage = new Date().getTime() - timeStartLoadPage;
  });

  pushStateEl.addEventListener('hy-push-state-after', function() {
    _paq.push(['setReferrerUrl', referer]);
    _paq.push(['setCustomUrl', window.location.toString()]);
    _paq.push(['setDocumentTitle', document.title]);
    _paq.push(['deleteCustomVariables', 'page']);
    _paq.push(['setGenerationTimeMs', timeItTookToLoadPage]);
    _paq.push(['trackPageView']);
  });

  window.loadJSDeferred('{{site.matomo_analytics.root}}piwik.js');
</script>
{% endif %}
{% endcomment %}

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
jekyll-theme-hydebetty-1.0.2 _includes/my-body.html
jekyll-theme-hydebetty-1.0.1 _includes/my-body.html
jekyll-theme-hydejack-8.5.2 _includes/my-body.html
jekyll-theme-hydejack-8.5.1 _includes/my-body.html
jekyll-theme-hydejack-8.5.0 _includes/my-body.html
jekyll-theme-hydejack-8.4.0 _includes/my-body.html
jekyll-theme-hydejack-8.3.2 _includes/my-body.html
jekyll-theme-hydejack-8.3.1 _includes/my-body.html
jekyll-theme-hydejack-8.3.0 _includes/my-body.html
jekyll-theme-hydejack-8.2.0 _includes/my-body.html
jekyll-theme-hydejack-8.1.1 _includes/my-body.html
jekyll-theme-hydejack-8.1.0 _includes/my-body.html
jekyll-theme-hydejack-8.0.0 _includes/my-body.html