Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sualko/cloud_piwik.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2018-05-11 13:32:34 +0300
committersualko <klaus@jsxc.org>2018-05-11 13:32:34 +0300
commitfbb5d61f250e4d773145420cc092fa108d4675cc (patch)
tree70ac25aa26f49f64d8be00107796849f0226af0a
parent7de303848aa742371b96e4cf4903552a5e7d93c4 (diff)
fix shorten urls
-rw-r--r--js/track.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/track.js b/js/track.js
index c3a4689..88eb3cd 100644
--- a/js/track.js
+++ b/js/track.js
@@ -40,7 +40,7 @@ var _paq = _paq || [];
function track(options) {
var app = null;
var path = window.location.pathname;
- var pathparts = path.match(/index\.php\/apps\/([a-z0-9]+)\/?/i) || path.match(/index\.php\/([a-z0-9]+)(\/([a-z0-9]+))?/i) || [];
+ var pathparts = path.match(/(?:index\.php\/)?apps\/([a-z0-9]+)\/?/i) || path.match(/(?:index\.php\/)?([a-z0-9]+)(\/([a-z0-9]+))?/i) || [];
if (pathparts.length >= 2) {
app = pathparts[1];