From 56d367cd5910d44e9a7644b65317fa8a72495f5d Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Wed, 27 May 2020 09:52:02 +0300 Subject: [PATCH] Add analytics --- public/index.html | 6 ++++++ src/App.vue | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/public/index.html b/public/index.html index dbdac3ef6..4599eb1bf 100644 --- a/public/index.html +++ b/public/index.html @@ -2,6 +2,12 @@ + + diff --git a/src/App.vue b/src/App.vue index ede0731fb..9a7725a43 100755 --- a/src/App.vue +++ b/src/App.vue @@ -49,6 +49,13 @@ export default { $route: { immediate: true, handler(to) { + let route = window.location.href.split('/#')[1]; + if (to.path === route) { + window['gtag']('config', 'UA-93461466-1', { + 'page_path': '/primevue' + to.path + }); + } + this.sidebarActive = false; this.$toast.removeAllGroups(); }