Skip to content

Commit d5753b7

Browse files
author
Joni Palosaari
committed
add google analytics basic setup
1 parent 567b721 commit d5753b7

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

sources/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
<html lang="en">
33

44
<head>
5+
<!-- Google Analytics -->
6+
<script>
7+
(function (i, s, o, g, r, a, m) {
8+
i['GoogleAnalyticsObject'] = r;
9+
i[r] = i[r] || function () {
10+
(i[r].q = i[r].q || []).push(arguments)
11+
}, i[r].l = 1 * new Date();
12+
a = s.createElement(o),
13+
m = s.getElementsByTagName(o)[0];
14+
a.async = 1;
15+
a.src = g;
16+
m.parentNode.insertBefore(a, m)
17+
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
18+
19+
ga('create', 'UA-106835747-2', 'auto');
20+
ga('send', 'pageview');
21+
22+
</script>
23+
<!-- End Google Analytics -->
524
<title>Robot Framework</title>
625
<meta charset="utf-8">
726
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

sources/src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import BootstrapVue from 'bootstrap-vue'
2121
Vue.use(BootstrapVue)
2222
Vue.use(VueRouter)
2323

24-
if (/robotframework.org/.test(window.location.href)) {
24+
/* if (/robotframework.org/.test(window.location.href)) {
2525
Vue.use(VueAnalytics, {
2626
id: ['UA-106835747-2']
2727
})
28-
}
28+
} */
2929

3030
require('@/assets/css/main.css')
3131
require('@/assets/css/pygments.css')

0 commit comments

Comments
 (0)