Giter Site home page Giter Site logo

gueux / middleman-piwik Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mscherer/middleman-piwik

0.0 1.0 0.0 14 KB

middleman-piwik is an extension for the Middleman static site generator that ease the use of the Piwik web analytics platform.

License: MIT License

Ruby 61.78% Gherkin 28.43% HTML 9.79%

middleman-piwik's Introduction

Middleman-Piwik

middleman-piwik is an extension for the Middleman static site generator that ease the use of the Piwik web analytics platform.

Installation

Just add gem "middleman-piwik" to your existing Gemfile and run bundle install.

Configuration

activate :piwik do |p|
    p.piwik_id = 1
    p.piwik_domain = 'piwik.example.net'
    p.piwik_path = '/piwik'
    p.disable = false
    p.minify = false
end

piwik_id is the id of the site, as given by piwik. Usually, it start at 1.

piwik_domain is the domain name of the piwik server.

piwik_path is the path of the piwik installation. By default, it take the root of the website.

disable - disable extension (default = false)

minify - compress the JavaScript code (default = false)

Helper

The extension adds 3 new helper to Middleman to add the proper javascript and img in your website

<%= insert_piwik_tracker %>

The one that should be almost always be used is insert_piwik_tracker, which will try to insert the regular javascript code and a img tag as a fallback.

The 2 others insert_piwik_tracker_js and insert_piwik_tracker_img will add only the javascript tracker or the img one.

Note !!!

Compatible with Middleman 4

middleman-piwik's People

Contributors

mscherer avatar gueux avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.