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
path: root/js
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2016-10-22 19:08:27 +0300
committersualko <klaus@jsxc.org>2016-10-22 19:08:27 +0300
commitc70a944189e05af7587bfb38de772d80349cbfe1 (patch)
tree6dda6d8e96fce8f5fe7810c2528f775321fb5a9f /js
parentd7cf3baed868a54c64f0a115234ba2203af16087 (diff)
Track file or folder name of share in new custom variable slot 3
A big thank you to Florian for this enhancement
Diffstat (limited to 'js')
-rw-r--r--js/track.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/track.js b/js/track.js
index 5c77611..d5a0473 100644
--- a/js/track.js
+++ b/js/track.js
@@ -38,6 +38,15 @@ var _paq = _paq || [];
if (app === 's') {
app = 'share';
+ var sharevalue = $('input[name="filename"]').val();
+
+ if(sharevalue) {
+ sharevalue = pathparts[3] + ' (' + sharevalue + ')';
+ _paq.push(['setCustomVariable', '3', 'ShareNodes', sharevalue, 'page']);
+ } else {
+ sharevalue = pathparts[3];
+ }
+
_paq.push(['setCustomVariable', '2', 'Shares', pathparts[3], 'page']);
}