Sha256: 07ca99fc80af089838c66ebd203648770d1cc83d1bbcbaadc190ac1059ec7b4f

Contents?: true

Size: 1.73 KB

Versions: 8

Compression:

Stored size: 1.73 KB

Contents

<script async src="https://www.google-analytics.com/analytics.js"></script>
<script async src="{{ site.baseurl }}/assets/javascripts/autotrack.js"></script>
<script>

window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ site.google_analytics }}', 'auto');

ga('require', 'cleanUrlTracker', {
  trailingSlash: 'remove'
});
ga('require', 'maxScrollTracker');
ga('require', 'mediaQueryTracker', {
  definitions: [
    {
      name: 'Breakpoint',
      dimensionIndex: 1,
      items: [
        {name: 'sm', media: 'all'},
        {name: 'md', media: '(min-width: 768px)'},
        {name: 'lg', media: '(min-width: 1200px)'}
      ]
    },
    {
      name: 'Pixel Density',
      dimensionIndex: 2,
      items: [
        {name: '1x',   media: 'all'},
        {name: '1.5x', media: '(min-resolution: 144dpi)'},
        {name: '2x',   media: '(min-resolution: 192dpi)'}
      ]
    },
    {
      name: 'Orientation',
      dimensionIndex: 3,
      items: [
        {name: 'landscape', media: '(orientation: landscape)'},
        {name: 'portrait',  media: '(orientation: portrait)'}
      ]
    }
  ]
});
ga('require', 'outboundLinkTracker', {
  events: ['click', 'auxclick', 'contextmenu']
});
ga('require', 'pageVisibilityTracker', {
  sendInitialPageview: true,
});

ga('send', 'pageview');

function sendGaEvent(category, action, element, value) {
    var title = element.getAttribute('title');
    var textConent = element.textContent ? element.textContent.trim() : undefined;
    var label = (title && title.length !== 0) ? title : textConent;
    ga('send', {
        hitType: 'event',
        eventCategory: category,
        eventAction: action.trim(),
        eventLabel: label,
        eventValue: value
    });
}
</script>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jekyll-theme-simple-texture-0.2.3 _includes/common/analytics.html
jekyll-theme-simple-texture-0.2.2 _includes/common/analytics.html
jekyll-theme-simple-texture-0.2.1 _includes/common/analytics.html
jekyll-theme-simple-texture-0.1.8 _includes/common/analytics.html
jekyll-theme-simple-texture-0.1.7 _includes/common/analytics.html
jekyll-theme-simple-texture-0.1.6 _includes/common/analytics.html
jekyll-theme-simple-texture-0.1.5 _includes/common/analytics.html
jekyll-theme-simple-texture-0.1.4 _includes/common/analytics.html