Sha256: 368770500e9ee0d4c0363e51441bb0f1b7731f14b8793ce3c9b2f83107a6385c

Contents?: true

Size: 1.3 KB

Versions: 17

Compression:

Stored size: 1.3 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.getElementById('_pushState');
  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

17 entries across 17 versions & 1 rubygems

Version Path
jekyll-theme-hydejack-9.2.1 _includes/my-body.html
jekyll-theme-hydejack-9.2.0 _includes/my-body.html
jekyll-theme-hydejack-9.1.9 _includes/my-body.html
jekyll-theme-hydejack-9.1.8 _includes/my-body.html
jekyll-theme-hydejack-9.1.7 _includes/my-body.html
jekyll-theme-hydejack-9.1.6 _includes/my-body.html
jekyll-theme-hydejack-9.1.5 _includes/my-body.html
jekyll-theme-hydejack-9.1.4 _includes/my-body.html
jekyll-theme-hydejack-9.1.3 _includes/my-body.html
jekyll-theme-hydejack-9.1.2 _includes/my-body.html
jekyll-theme-hydejack-9.1.1 _includes/my-body.html
jekyll-theme-hydejack-9.1.0 _includes/my-body.html
jekyll-theme-hydejack-9.0.4 _includes/my-body.html
jekyll-theme-hydejack-9.0.3 _includes/my-body.html
jekyll-theme-hydejack-9.0.2 _includes/my-body.html
jekyll-theme-hydejack-9.0.1 _includes/my-body.html
jekyll-theme-hydejack-9.0.0 _includes/my-body.html