Skip to content

Commit 4640720

Browse files
committed
📊 switch from GA to Matomo
1 parent d46be98 commit 4640720

File tree

3 files changed

+25
-30
lines changed

3 files changed

+25
-30
lines changed

_config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
name: CSS3 Playground
12
exclude: [CONTRIBUTING.md, README.md, CNAME, Gemfile, Gemfile.lock]
23
include: [.htaccess]
34
permalink: pretty
45
debug: false
56
relative_permalinks: false
7+
8+
matomo:
9+
url: stats.css3playground.com
10+
id: 4

_includes/matomo.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- Matomo -->
2+
<script type="text/javascript">
3+
var _paq = _paq || [];
4+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
5+
_paq.push(['trackPageView']);
6+
_paq.push(['enableLinkTracking']);
7+
(function() {
8+
var u="https://{{ site.matomo.url }}/";
9+
_paq.push(['setTrackerUrl', u+'piwik.php']);
10+
_paq.push(['setSiteId', '{{ site.matomo.id }}']);
11+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
12+
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
13+
})();
14+
</script>
15+
<noscript><p><img src="https://{{ site.matomo.url }}/piwik.php?idsite={{ site.matomo.id }}&rec=1" style="border:0;" alt="" /></p></noscript>
16+
<!-- End Matomo Code -->

_layouts/default.html

+4-30
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,11 @@
99
{% if page.jqueryui == true %}
1010
<link href="/css/jquery-ui-1.8.24.css" rel="stylesheet">
1111
<script src="/js/jquery-ui-1.10.3.min.js"></script>
12-
{% endif %}
12+
{%- endif -%}
13+
{% include matomo.html %}
1314
</head>
1415
<body>
15-
{{ content }}
16-
{% include nav.html %}
17-
18-
<script type="text/javascript">
19-
//
20-
//
21-
//
22-
//
23-
//
24-
//
25-
// PLEASE, PLEASE, STOP TAKING MY GOOGLE ANALYTICS NUMBER!!!!!!!!!!!!!!!!!!!
26-
// TAKE ALL THE CODE YOU WANT, JUST NOT MY GA NUMBER!!!!!!!!!!!!!!!!!!!!!!!!
27-
//
28-
//
29-
//
30-
//
31-
//
32-
//
33-
var _gaq = _gaq || [];
34-
_gaq.push(['_setAccount', 'UA-432773-11']);
35-
_gaq.push(['_trackPageview']);
36-
37-
(function() {
38-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
39-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
40-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
41-
})();
42-
43-
</script>
16+
{{ content }}
17+
{% include nav.html %}
4418
</body>
4519
</html>

0 commit comments

Comments
 (0)