diff options
author | alexbeletsky <alexander.beletsky@gmail.com> | 2016-03-04 12:21:58 +0300 |
---|---|---|
committer | alexbeletsky <alexander.beletsky@gmail.com> | 2016-03-04 12:21:58 +0300 |
commit | 2b7cec0c962075b7b838b6135e02efe5216813a0 (patch) | |
tree | e36a401725c628dab12e7a832fb2e457b920f1b1 /js | |
parent | 39f6964dbfd3b66520dd04728b64cdc856a532c3 (diff) |
use piwik as window reference
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/piwik.js b/js/piwik.js index 639f5f05e4..fa30fe8f28 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -1046,8 +1046,8 @@ if (typeof _paq !== 'object') { } // Piwik singleton and namespace -if (typeof Piwik !== 'object') { - Piwik = (function () { +if (typeof window.Piwik !== 'object') { + window.Piwik = (function () { 'use strict'; /************************************************************ @@ -2086,7 +2086,7 @@ if (typeof Piwik !== 'object') { var foundNodes = nodeToSearch.getElementsByClassName(className); return this.htmlCollectionToArray(foundNodes); } - + var children = getChildrenFromNode(nodeToSearch); if (!children || !children.length) { @@ -6501,7 +6501,7 @@ if (window && window.piwikAsyncInit) { (function () { var jsTrackerType = (typeof AnalyticsTracker); if (jsTrackerType === 'undefined') { - AnalyticsTracker = Piwik; + AnalyticsTracker = window.Piwik; } }()); /*jslint sloppy: false */ @@ -6543,7 +6543,7 @@ if (typeof piwik_log !== 'function') { // instantiate the tracker var option, - piwikTracker = Piwik.getTracker(piwikUrl, siteId); + piwikTracker = window.Piwik.getTracker(piwikUrl, siteId); // initialize tracker piwikTracker.setDocumentTitle(documentTitle); |