matomo-middleman 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76cdf85515a5678967559a03dcc18c8b2061c5fae8c4660c08644c0551dad2cc
4
- data.tar.gz: e7c69eaf075ae2bed4f93fa87faec2729e0eaae5a5faa18cce2cda9f4330fe0b
3
+ metadata.gz: 9e2f819156a214c3a1e3d7c3f4bb7212375cccc52334e7db546cb655ac7267c1
4
+ data.tar.gz: ad3e4861f0100201e45a7af0dbdea435c96a0cf5c1c5496e49db435143a2aada
5
5
  SHA512:
6
- metadata.gz: 941ef4fac642a681b23a7ccd090c322000bdb96163f6f2ddc4d33c7fd3761d7c6f8c9ee72d0e7115c91a7f71ad238d0c1e3e4b5a46be525d0d639c13b2373f86
7
- data.tar.gz: 25b7b789fe5e1005b20054cbff07bb5399d8cf69c8fe843d4a337088df171022815e27e0862d4d6a6014b9fead6e9175f6dfb0f90a0163577edc7e93a284cc00
6
+ metadata.gz: c8b88b1e57b0e861ebf4b670a1edd415faa1dc905f8130c36fc25a41367a8d19cc26876811523ab60222066acbf2469c833c9ea48e0b0340452194832f5e2d39
7
+ data.tar.gz: 4f0ab983a6313c463728c533cc45b4114671fa4956672bc8015eabe3598c0e00097372ec6e8f11102aaf892e1aec5c59a49dfe9057a478191d5a37a5b24d9eb4
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![Gem Version](https://badge.fury.io/rb/matomo-middleman.svg)](https://badge.fury.io/rb/matomo-middleman)
3
3
 
4
4
  It's an extension for the [Middleman](http://middlemanapp.com/) static site generator
5
- to use [Matomo](https://matomo.org/) tracking (previously known as [Piwik](https://matomo.org/blog/2018/01/piwik-is-now-matomo/)).
5
+ to use [Matomo](https://matomo.org/) tracking.
6
6
 
7
7
 
8
8
  ## Installation
@@ -12,7 +12,7 @@ Then add the following line to your `Gemfile`:
12
12
 
13
13
 
14
14
  ```ruby
15
- gem 'matomo-middleman', path: "/home/wm/git/matomo-middleman/"
15
+ gem 'matomo-middleman'
16
16
  ```
17
17
 
18
18
  Run `bundle install`.
@@ -45,21 +45,19 @@ which will expand to
45
45
 
46
46
  ```erb
47
47
  <script type="text/javascript">
48
- var _paq = _paq || [];
48
+ var _paq = window._paq = window._paq || [];
49
49
  _paq.push(['trackPageView']);
50
50
  _paq.push(['enableLinkTracking']);
51
51
  (function() {
52
52
  var u=(("https:" == document.location.protocol) ? "https" : "http") + "://<your-domain>/<your-url>/";
53
- _paq.push(['setTrackerUrl', u+'piwik.php']);
53
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
54
54
  _paq.push(['setSiteId', 1]);
55
55
  var d=document, g=d.createElement('script'),
56
56
  s=d.getElementsByTagName('script')[0];
57
- g.type='text/javascript';
58
- g.defer=true; g.async=true;
59
- g.src=u+'piwik.js';
57
+ g.async=true;
58
+ g.src=u+'matomo.js';
60
59
  s.parentNode.insertBefore(g,s);
61
60
  })();
62
61
  </script>
63
- <noscript><p><img src="https://<your-domain>/<your-url>/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
64
62
  ```
65
63
 
@@ -3,7 +3,7 @@ require 'middleman-core'
3
3
 
4
4
  # Extension namespace
5
5
  class MatomoExtension < ::Middleman::Extension
6
- option :domain, 'localhost.com', 'An example url for motomo'
6
+ option :domain, 'localhost.com', 'An example url for matomo'
7
7
  option :url, 'matomo', 'An example path to your matomo installation'
8
8
  option :id, 1, 'The id for matomo'
9
9
 
@@ -16,20 +16,23 @@ class MatomoExtension < ::Middleman::Extension
16
16
  helpers do
17
17
  def matomo
18
18
  <<END
19
- <script>
20
- var _paq = _paq || [];
19
+ <script type="text/javascript">
20
+ var _paq = window._paq = window._paq || [];
21
21
  _paq.push(['trackPageView']);
22
22
  _paq.push(['enableLinkTracking']);
23
23
  (function() {
24
- var u=(("https:" == document.location.protocol) ? "https" : "http") + "://#{config[:matomo_domain]}/#{config[:matomo_url]}/";
25
- _paq.push(['setTrackerUrl', u+'piwik.php']);
26
- _paq.push(['setSiteId', 1]);
27
- var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
28
- g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
24
+ var u=(("https:" == document.location.protocol) ? "https" : "http") + "://#{config[:matomo_domain]}/#{config[:matomo_url]}/";
25
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
26
+ _paq.push(['setSiteId', #{config[:matomo_id]}]);
27
+ var d=document, g=d.createElement('script'),
28
+ s=d.getElementsByTagName('script')[0];
29
+ g.async=true;
30
+ g.src=u+'matomo.js';
31
+ s.parentNode.insertBefore(g,s);
29
32
  })();
30
33
  </script>
31
- <noscript><p><img src="https://#{config[:matomo_domain]}/#{config[:matomo_url]}/piwik.php?idsite=#{config[:matomo_id]}" style="border:0;" alt="" /></p></noscript>
32
34
  END
33
35
  end
34
36
  end
35
37
  end
38
+
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "matomo-middleman"
6
- s.version = "0.0.3"
6
+ s.version = "0.0.4"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Matthias Guenther"]
9
9
  s.email = ["matze@wikimatze.de"]
@@ -21,5 +21,5 @@ Gem::Specification.new do |s|
21
21
  s.extra_rdoc_files = ['README.md']
22
22
 
23
23
  # The version of middleman-core your extension depends on
24
- s.add_runtime_dependency 'middleman-core', '~> 4'
24
+ s.add_runtime_dependency 'middleman-core', '>= 4.2'
25
25
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matomo-middleman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Guenther
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-09 00:00:00.000000000 Z
11
+ date: 2026-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4'
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4'
26
+ version: '4.2'
27
27
  description: Add tracking code for matomo
28
28
  email:
29
29
  - matze@wikimatze.de
@@ -58,8 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubyforge_project:
62
- rubygems_version: 2.7.3
61
+ rubygems_version: 3.1.4
63
62
  signing_key:
64
63
  specification_version: 4
65
64
  summary: Add tracking helper for matomo