diff options
author | sualko <klaus@jsxc.org> | 2016-10-22 19:08:27 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2016-10-22 19:08:27 +0300 |
commit | c70a944189e05af7587bfb38de772d80349cbfe1 (patch) | |
tree | 6dda6d8e96fce8f5fe7810c2528f775321fb5a9f /js | |
parent | d7cf3baed868a54c64f0a115234ba2203af16087 (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.js | 9 |
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']); } |