diff --git a/www/layouts/default.vue b/www/layouts/default.vue
index 83178e7..a1f51dc 100644
--- a/www/layouts/default.vue
+++ b/www/layouts/default.vue
@@ -31,22 +31,6 @@
-
-
-
-
-
diff --git a/www/nuxt.config.js b/www/nuxt.config.js
index 04917c2..973781b 100644
--- a/www/nuxt.config.js
+++ b/www/nuxt.config.js
@@ -34,8 +34,7 @@ export default {
** Plugins to load before mounting the App
** https://nuxtjs.org/guide/plugins
*/
- plugins: [
- ],
+ plugins: [{ src: '~plugins/ga.js', mode: 'client' }],
/*
** Auto import components
** See https://nuxtjs.org/api/configuration-components
diff --git a/www/plugins/ga.js b/www/plugins/ga.js
new file mode 100644
index 0000000..dde3f9b
--- /dev/null
+++ b/www/plugins/ga.js
@@ -0,0 +1,44 @@
+/* eslint-disable */
+
+export default ({ app }) => {
+ /*
+ ** Only run on client-side and only in production mode
+ */
+ if (process.env.NODE_ENV !== "production")
+ return /*
+ ** Include Google Analytics Script
+ */;
+ (function(i, s, o, g, r, a, m) {
+ i["GoogleAnalyticsObject"] = r;
+ (i[r] =
+ i[r] ||
+ function() {
+ (i[r].q = i[r].q || []).push(arguments);
+ }),
+ (i[r].l = 1 * new Date());
+ (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
+ a.async = 1;
+ a.src = g;
+ m.parentNode.insertBefore(a, m);
+ })(
+ window,
+ document,
+ "script",
+ "https://www.google-analytics.com/analytics.js",
+ "ga"
+ );
+ /*
+ ** Set the current page
+ */
+ ga("create", "UA-5243064-21", "auto");
+ /*
+ ** Every time the route changes (fired on initialization too)
+ */
+ app.router.afterEach((to, from) => {
+ /*
+ ** We tell Google Analytics to add a `pageview`
+ */
+ ga("set", "page", to.fullPath);
+ ga("send", "pageview");
+ });
+};