diff options
author | diosmosis <benaka@piwik.pro> | 2015-06-24 08:30:12 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-25 14:13:35 +0300 |
commit | 4b8824f2a77b10719878dcee004907fb5ef8ad77 (patch) | |
tree | ec0352d22bb2ce32d10f4d71297236b39523df6f /js | |
parent | 06f46e36abead3810e1d073e0e7e9d424547bc3f (diff) |
Add <DEBUG> comments to beforea nd after disableHeartBeatTimer so it doesn't appear in minified piwik.js. And set last tracker request time in makeSureThereIsAGapAfterFirstTrackingRequestToPreventMultipleVisitorCreation for increased code clarity + so it will be set when bulk requests sent.
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/piwik.js b/js/piwik.js index b67b12cf03..cfd8151a79 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -2559,6 +2559,8 @@ if (typeof Piwik !== 'object') { var now = new Date(); var timeNow = now.getTime(); + lastTrackerRequestTime = timeNow; + if (timeNextTrackingRequestCanBeExecutedImmediately && timeNow < timeNextTrackingRequestCanBeExecutedImmediately) { // we are in the time frame shortly after the first request. we have to delay this request a bit to make sure // a visitor has been created meanwhile. @@ -2586,8 +2588,6 @@ if (typeof Piwik !== 'object') { * Send request */ function sendRequest(request, delay, callback) { - lastTrackerRequestTime = (new Date()).getTime(); - if (!configDoNotTrack && request) { makeSureThereIsAGapAfterFirstTrackingRequestToPreventMultipleVisitorCreation(function () { if (configRequestMethod === 'POST') { @@ -5014,6 +5014,7 @@ if (typeof Piwik !== 'object') { } }, +/*<DEBUG>*/ /** * Clear heartbeat. */ @@ -5021,6 +5022,7 @@ if (typeof Piwik !== 'object') { heartBeatDown(); configHeartBeatDelayInSeconds = null; }, +/*</DEBUG>*/ /** * Frame buster |