]> source.dussan.org Git - vaadin-core.git/commitdiff
Convert new path to old pattern to reuse current data in GA 0.3.0-beta9
authorManolo Carrasco <manolo@apache.org>
Fri, 18 Sep 2015 09:10:13 +0000 (11:10 +0200)
committerManolo Carrasco <manolo@apache.org>
Fri, 18 Sep 2015 09:10:13 +0000 (11:10 +0200)
ga.js

diff --git a/ga.js b/ga.js
index 4299af2250ad7fbf1911ebddac4e5c45cf42e2f4..8439f090f41ca2304559ca281feed98c5c440f43 100644 (file)
--- a/ga.js
+++ b/ga.js
@@ -9,7 +9,9 @@ ga('create', 'UA-658457-6', 'auto');
 
 function locationHashChanged() {
   if(/vaadin/.test(window.location.hostname)) {
-    var pageViewUrl = (window.location.pathname + window.location.hash).replace('#', '/');
+    var pageViewUrl = (window.location.pathname + window.location.hash)
+      .replace(/vaadin-components\/latest\/(.+)\/demo/, 'components-examples/$1')
+      .replace('#', '/');
     ga('send', 'pageview', pageViewUrl)
   }
 }