diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-10-14 07:12:09 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-10-14 07:12:09 +0400 |
commit | 863b35ff38636e1ee1e8871e1b02ec36c9cc5786 (patch) | |
tree | 03fd4522feb65e70a57caae6c92157d87a600970 /js | |
parent | 59771059a999c09eab58bc44101fdac12e6fa6dd (diff) |
refs #6415 we have to update cookie timeout whenever the cookie name changes
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/js/piwik.js b/js/piwik.js index 78b9b41ca3..c6a70cb7c0 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -454,7 +454,8 @@ if (typeof JSON2 !== 'object') { enableTrackOnlyVisibleContent, trackContentInteraction, clearEnableTrackOnlyVisibleContent, trackVisibleContentImpressions, isTrackOnlyVisibleContentEnabled, port, isUrlToCurrentDomain, isNodeAuthorizedToTriggerInteraction, replaceHrefIfInternalLink, getConfigDownloadExtensions, disableLinkTracking, - substr, setAnyAttribute, wasContentTargetAttrReplaced, max, abs, childNodes, compareDocumentPosition, body + substr, setAnyAttribute, wasContentTargetAttrReplaced, max, abs, childNodes, compareDocumentPosition, body, + getConfigVisitorCookieTimeout */ /*global _paq:true */ /*members push */ @@ -2642,6 +2643,7 @@ if (typeof Piwik !== 'object') { // returning visitor flag tmpContainer.unshift('0'); + } else { // uuid - generate a pseudo-unique ID to fingerprint this user; // note: this isn't a RFC4122-compliant UUID @@ -3966,6 +3968,11 @@ if (typeof Piwik !== 'object') { return originalTimeout; } + function updateRemainingVisitorCookieTimeout() + { + configVisitorCookieTimeout = getRemainingVisitorCookieTimeout(); + } + /*<DEBUG>*/ /* * Register a test hook. Using eval() permits access to otherwise @@ -3999,7 +4006,7 @@ if (typeof Piwik !== 'object') { */ detectBrowserFeatures(); updateDomainHash(); - configVisitorCookieTimeout = getRemainingVisitorCookieTimeout(); + updateRemainingVisitorCookieTimeout(); /*<DEBUG>*/ /* @@ -4157,6 +4164,7 @@ if (typeof Piwik !== 'object') { */ setSiteId: function (siteId) { configTrackerSiteId = siteId; + updateRemainingVisitorCookieTimeout(); }, /** @@ -4512,6 +4520,7 @@ if (typeof Piwik !== 'object') { configCookieNamePrefix = cookieNamePrefix; // Re-init the Custom Variables cookie customVariables = getCustomVariablesFromCookie(); + updateRemainingVisitorCookieTimeout(); }, /** @@ -4522,6 +4531,7 @@ if (typeof Piwik !== 'object') { setCookieDomain: function (domain) { configCookieDomain = domainFixup(domain); updateDomainHash(); + updateRemainingVisitorCookieTimeout(); }, /** @@ -4532,6 +4542,7 @@ if (typeof Piwik !== 'object') { setCookiePath: function (path) { configCookiePath = path; updateDomainHash(); + updateRemainingVisitorCookieTimeout(); }, /** |