diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-14 03:29:19 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-14 03:29:19 +0400 |
commit | 7c2dd6ada7afe2343c9e26e09abbc33613138372 (patch) | |
tree | 1a1dc789d87f40859d2e239497d26691012aa8b1 /js | |
parent | a9d8533eb1bc50dcfa46b39f31a105a8b7cb1815 (diff) |
refs #5049 added possiblity to use async + multiple piwik trackers
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/js/piwik.js b/js/piwik.js index e46ec90a6c..6c3762f4a7 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -391,7 +391,7 @@ if (typeof JSON2 !== 'object') { /*global unescape */ /*global ActiveXObject */ /*members encodeURIComponent, decodeURIComponent, getElementsByTagName, - shift, unshift, + shift, unshift, piwikAsyncInit, createElement, appendChild, characterSet, charset, addEventListener, attachEvent, removeEventListener, detachEvent, disableCookies, cookie, domain, readyState, documentElement, doScroll, title, text, @@ -2090,25 +2090,6 @@ if (typeof Piwik !== 'object') { // optimization of the if..elseif..else construct below return linkPattern.test(className) ? 'link' : (downloadPattern.test(className) || downloadExtensionsPattern.test(href) ? 'download' : (isInLink ? 0 : 'link')); - -/* - var linkType = 0; - - if (linkPattern.test(className)) { - // class attribute contains 'piwik_link' (or user's override) - linkType = 'link'; - } else if (downloadPattern.test(className)) { - // class attribute contains 'piwik_download' (or user's override) - linkType = 'download'; - } else if (downloadExtensionsPattern.test(sourceHref)) { - // file extension matches a defined download extension - linkType = 'download'; - } else if (!isInLink) { - linkType = 'link'; - } - - return linkType; - */ } /* @@ -3210,6 +3191,10 @@ if (typeof Piwik !== 'object') { }()); } +if (window && window.piwikAsyncInit) { + window.piwikAsyncInit(); +} + /************************************************************ * Deprecated functionality below * Legacy piwik.js compatibility ftw |