Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-10-14 07:12:09 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-10-14 07:12:09 +0400
commit863b35ff38636e1ee1e8871e1b02ec36c9cc5786 (patch)
tree03fd4522feb65e70a57caae6c92157d87a600970 /js
parent59771059a999c09eab58bc44101fdac12e6fa6dd (diff)
refs #6415 we have to update cookie timeout whenever the cookie name changes
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js15
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();
},
/**