diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-09-22 10:49:31 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-09-22 10:49:31 +0400 |
commit | 38457fe029cb03ab882a2f77a619828e4d3973e1 (patch) | |
tree | 865b998aa3fa0692c8843dddf326e69e0d48b8ad /js | |
parent | 83fed18a6ba9f48c1012e96bf1e78358aa4fe2b1 (diff) |
Refs #3490 Add `getUserId` Javascript helper + test
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/js/piwik.js b/js/piwik.js index 471e06ed4c..232f6c0ed9 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -408,7 +408,7 @@ if (typeof JSON2 !== 'object') { exec, res, width, height, devicePixelRatio, pdf, qt, realp, wma, dir, fla, java, gears, ag, - hook, getHook, getVisitorId, getVisitorInfo, setUserId, setSiteId, setTrackerUrl, appendToTrackingUrl, getRequest, addPlugin, + hook, getHook, getVisitorId, getVisitorInfo, setUserId, getUserId, setSiteId, setTrackerUrl, appendToTrackingUrl, getRequest, addPlugin, getAttributionInfo, getAttributionCampaignName, getAttributionCampaignKeyword, getAttributionReferrerTimestamp, getAttributionReferrerUrl, setCustomData, getCustomData, @@ -4107,6 +4107,15 @@ if (typeof Piwik !== 'object') { }, /** + * Gets the User ID if set. + * + * @returns string User ID + */ + getUserId: function() { + return configUserId; + }, + + /** * Pass custom data to the server * * Examples: |