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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-05-19 03:07:07 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-05-19 03:07:07 +0400
commit016cf9e40f5ef55d0cc6fc6ba7b8f1647452154c (patch)
tree00945d5a10abef53ca3147d5d339b7df64288e67 /js
parent5161aaaecc7c074827364ec2a537e0ddf325ac44 (diff)
added possibility to get/create a tracker by using "Tracker = AnalyticsTracker.getTracker" instead of "Piwik.getTracker". Variable will be set only if no such variable is defined yet
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 6c3762f4a7..ac9345aa36 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -3195,6 +3195,13 @@ if (window && window.piwikAsyncInit) {
window.piwikAsyncInit();
}
+(function () {
+ var jsTrackerType = (typeof AnalyticsTracker);
+ if (jsTrackerType === 'undefined') {
+ AnalyticsTracker = Piwik;
+ }
+})();
+
/************************************************************
* Deprecated functionality below
* Legacy piwik.js compatibility ftw