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:
authorVjacheslav Murashkin <vmurashkin@gmail.com>2014-09-24 22:57:27 +0400
committerVjacheslav Murashkin <vmurashkin@gmail.com>2014-09-24 22:57:27 +0400
commit7d672bf4848e7840b21961170b0ddf92cc8f151b (patch)
tree59e41120e0a99ec12ed68d66ef5c516be17188a2 /js
parent398b7832e895be92dcec2ace0c24186ca280623a (diff)
refs #6257 Piwik.getVisitorId() function
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 0421a00034..86caf1eac9 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -2288,7 +2288,7 @@ if (typeof Piwik !== 'object') {
domainHash,
// Visitor UUID
- visitorUUID = uuid || null;
+ visitorUUID = uuid;
/*
* Set cookie value
@@ -5125,7 +5125,7 @@ if (typeof Piwik !== 'object') {
* @return Tracker
*/
getTracker: function (piwikUrl, siteId) {
- return new Tracker(piwikUrl, siteId, asyncTracker.getVisitorId());
+ return new Tracker(piwikUrl, siteId, this.getVisitorId());
},
/**
@@ -5135,6 +5135,15 @@ if (typeof Piwik !== 'object') {
*/
getAsyncTracker: function () {
return asyncTracker;
+ },
+
+ /**
+ * Get visitor ID (from first party cookie)
+ *
+ * @return string Visitor ID in hexits (or null, if not yet known)
+ */
+ getVisitorId: function () {
+ return asyncTracker.getVisitorId();
}
};