8000 Fix ga · thomasfowler/bootstrap-vue@cacc769 · GitHub
[go: up one dir, main page]

Skip to content

Commit cacc769

Browse files
committed
Fix ga
1 parent b06061d commit cacc769

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

docs/layouts/site.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
export default {
2222
components: {mNav, mFooter},
2323
mounted(){
24-
this.$ga.page(window.location.pathname);
24+
// this.$ga.page(window.location.pathname);
25+
window.ga('send', 'pageview');
2526
}
2627
}
2728
</script>

docs/plugins/ga.js

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,9 @@ import Vue from 'vue'
22
import VueAnalytics from 'vue-analytics/src'
33

44
if (process.BROWSER_BUILD) {
5-
6-
VueAnalytics.install(Vue, {
7-
// debug: true,
8-
});
9-
10-
(function (i, s, o, g, r, a, m) {
11-
i['GoogleAnalyticsObject'] = r;
12-
i[r] = i[r] || function () {
13-
(i[r].q = i[r].q || []).push(arguments)
14-
}, i[r].l = 1 * new Date();
15-
a = s.createElement(o),
16-
m = s.getElementsByTagName(o)[0];
17-
a.async = 1;
18-
a.src = g;
19-
m.parentNode.insertBefore(a, m)
20-
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
21-
5+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
6+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
7+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
8+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
229
ga('create', 'UA-89526435-1', 'auto');
2310
}

0 commit comments

Comments
 (0)
0