diff options
author | Vjacheslav Murashkin <vmurashkin@gmail.com> | 2014-09-24 22:57:27 +0400 |
---|---|---|
committer | Vjacheslav Murashkin <vmurashkin@gmail.com> | 2014-09-24 22:57:27 +0400 |
commit | 7d672bf4848e7840b21961170b0ddf92cc8f151b (patch) | |
tree | 59e41120e0a99ec12ed68d66ef5c516be17188a2 /js | |
parent | 398b7832e895be92dcec2ace0c24186ca280623a (diff) |
refs #6257 Piwik.getVisitorId() function
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 13 |
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(); } }; |