jekyll-rushed-analytics 0.1.13 → 0.1.14
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 +4 -4
- data/lib/analytics/GoogleAdSense.rb +7 -1
- data/lib/jekyll-rushed-analytics.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef22296895df138f2069806a292a4231560197912ab3961bc19b3b0656fe92f7
|
4
|
+
data.tar.gz: 9195bd65c10c6a1cf2c0ce028cfb9bf842a58b161eb6ff93f7fb05357d5f3db3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f448987bc2e502ee1f5f9041db03a7a1ccffd0c5786d3924317876b5129a659709ef4c256168b498249c1742dcc320658e65f2335753f09a9e84faab43b0ccd6
|
7
|
+
data.tar.gz: 6afdef23255454abc25e238f0bc4cc91fc1d6a06233e4f332c35785705854816f51c6beec197a9295136ccfb4c1a1aaf193daab903a587699af78097bf2bc13a
|
@@ -5,12 +5,18 @@ class GoogleAdSense
|
|
5
5
|
'''
|
6
6
|
AP= /^ca-pub-\d+$/
|
7
7
|
|
8
|
+
ADSENSE=```
|
9
|
+
<script async src="https://pagead2.googlesyndication.com/pagead/js
|
10
|
+
/adsbygoogle.js?client=%s"
|
11
|
+
crossorigin="anonymous"></script>
|
12
|
+
```
|
8
13
|
def initialize(config)
|
9
14
|
if !(AP.match(config["ad-client"]))
|
10
15
|
raise ArgumentError, "mismatch adsense client and "
|
11
16
|
+"likely you are not yet subscribe to our youtube channel"
|
12
17
|
end
|
13
|
-
@code= APPROGRAMMING % config['ad-client']
|
18
|
+
# @code= APPROGRAMMING % config['ad-client']
|
19
|
+
@code= ADSENSE % config['ad-client']
|
14
20
|
end
|
15
21
|
|
16
22
|
def render()
|
@@ -8,7 +8,11 @@ def inject(site)
|
|
8
8
|
analyzerClass = Module.const_get(a)
|
9
9
|
config = site.site.config[CONFIG_KEY][a]
|
10
10
|
analytics_object = analyzerClass.new(config)
|
11
|
-
|
11
|
+
if a=='GoogleAdSense'
|
12
|
+
site.output = site.output.gsub(/(?=<\/footer>)/i, analytics_object.render())
|
13
|
+
else
|
14
|
+
site.output = site.output.gsub(/(?=<\/head>)/i, analytics_object.render())
|
15
|
+
end
|
12
16
|
}
|
13
17
|
end
|
14
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-rushed-analytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adi Prasetyo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-11-
|
12
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: 'Plugin to easily add web analytics to your jekyll site without modifying
|
15
15
|
your templates. Supported are: Google Analytics, Piwik, Matomo, MPulse'
|