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-09-10 18:39:26 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-10 18:39:26 +0400
commitf84cd9377360b68a77d52f427152b8da1e624808 (patch)
tree2edc7091be311e48c34a81fa324aa7de070a5790 /js
parent77abe4062a9fc71524a3a79c92c77f1cfced5eba (diff)
merged userid
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/js/piwik.js b/js/piwik.js
index f9309c217f..1c8b48c6d9 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, setSiteId, setTrackerUrl, appendToTrackingUrl, getRequest, addPlugin,
+ hook, getHook, getVisitorId, getVisitorInfo, setUserId, setSiteId, setTrackerUrl, appendToTrackingUrl, getRequest, addPlugin,
getAttributionInfo, getAttributionCampaignName, getAttributionCampaignKeyword,
getAttributionReferrerTimestamp, getAttributionReferrerUrl,
setCustomData, getCustomData,
@@ -2044,6 +2044,9 @@ if (typeof Piwik !== 'object') {
// Site ID
configTrackerSiteId = siteId || '',
+ // User ID
+ configUserId = '',
+
// Document URL
configCustomUrl,
@@ -2732,6 +2735,7 @@ if (typeof Piwik !== 'object') {
'&h=' + now.getHours() + '&m=' + now.getMinutes() + '&s=' + now.getSeconds() +
'&url=' + encodeWrapper(purify(currentUrl)) +
(configReferrerUrl.length ? '&urlref=' + encodeWrapper(purify(configReferrerUrl)) : '') +
+ (configUserId.length ? '&uid=' + encodeWrapper(configUserId) : '') +
'&_id=' + uuid + '&_idts=' + createTs + '&_idvc=' + visitCount +
'&_idn=' + newVisitor + // currently unused
(campaignNameDetected.length ? '&_rcn=' + encodeWrapper(campaignNameDetected) : '') +
@@ -3944,6 +3948,15 @@ if (typeof Piwik !== 'object') {
},
/**
+ * Sets a User ID to this user (such as an email address or a username)
+ *
+ * @param string User ID
+ */
+ setUserId: function (userId) {
+ configUserId = userId;
+ },
+
+ /**
* Pass custom data to the server
*
* Examples: