diff options
author | BeezyT <timo@ezdesign.de> | 2012-11-12 13:15:52 +0400 |
---|---|---|
committer | BeezyT <timo@ezdesign.de> | 2012-11-12 13:15:52 +0400 |
commit | 8c9ea809c403cdd80cf58aad5b885f2429933ee1 (patch) | |
tree | 56b7d46d91e19d35d30a033667334aa45466c841 /js/piwik.js | |
parent | 600e1296da8742aadd00a3a5bacbca1cf5ba0779 (diff) |
refs #2465
* Renaming Insight to Overlay
* Includes a new minified piwik.js, generated as described in js/README. Please double-check whether the file is OK.
* Servers that had the Insight plugin installed will need to delete it manually, right?
git-svn-id: http://dev.piwik.org/svn/trunk@7445 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'js/piwik.js')
-rw-r--r-- | js/piwik.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/js/piwik.js b/js/piwik.js index b430a2425d..7a978ce925 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -899,14 +899,14 @@ var } /************************************************************ - * Page Insight + * Page Overlay ************************************************************/ /* - * check whether this is an insight session + * check whether this is a page overlay session */ - function isInsightSession(configTrackerUrl, configTrackerSiteId) { - var windowName = 'Piwik_Insight'; + function isOverlaySession(configTrackerUrl, configTrackerSiteId) { + var windowName = 'Piwik_Overlay'; var referrer = documentAlias.referrer; var testReferrer = configTrackerUrl; @@ -923,7 +923,7 @@ var // build referrer regex to extract parameters var referrerRegExp = new RegExp('^' + testReferrer - + 'index\\.php\\?module=Insight&action=startInsightSession' + + 'index\\.php\\?module=Overlay&action=startOverlaySession' + '&idsite=([0-9]+)&period=([^&]+)&date=([^&]+)$'); var match = referrer.match(referrerRegExp); @@ -933,7 +933,7 @@ var if (parseInt(idsite, 10) !== configTrackerSiteId) { return false; } - // store insight session info in window name + // store overlay session info in window name var period = match[2]; var date = match[3]; window.name = windowName + '###' + period + '###' + date; @@ -946,9 +946,9 @@ var } /* - * inject the script needed for insight + * inject the script needed for page overlay */ - function injectInsightScripts(configTrackerUrl, configTrackerSiteId) { + function injectOverlayScripts(configTrackerUrl, configTrackerSiteId) { var windowNameParts = window.name.split('###'); var root = configTrackerUrl.substring(0, configTrackerUrl.length - 9); // remove piwik.php var period = windowNameParts[1]; @@ -958,7 +958,7 @@ var var onLoad = function () { if (!loaded) { loaded = true; - Piwik_Insight_Client.initialize(root, configTrackerSiteId, period, date); + Piwik_Overlay_Client.initialize(root, configTrackerSiteId, period, date); } }; @@ -971,12 +971,12 @@ var } }; script.onload = onLoad; - script.src = root + 'plugins/Insight/client/client.js'; + script.src = root + 'plugins/Overlay/client/client.js'; var head = document.getElementsByTagName('head')[0]; head.appendChild(script); } /************************************************************ - * End Piwik Insight + * End Page Overlay ************************************************************/ /* @@ -2667,9 +2667,9 @@ var * @param mixed customData */ trackPageView: function (customTitle, customData) { - if (isInsightSession(configTrackerUrl, configTrackerSiteId)) { + if (isOverlaySession(configTrackerUrl, configTrackerSiteId)) { trackCallback(function () { - injectInsightScripts(configTrackerUrl, configTrackerSiteId); + injectOverlayScripts(configTrackerUrl, configTrackerSiteId); }); } else { trackCallback(function () { |