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:
authormattab <matthieu.aubry@gmail.com>2013-03-13 04:22:41 +0400
committermattab <matthieu.aubry@gmail.com>2013-03-13 04:22:41 +0400
commite794cb331a72133ea065edaa8b8cdc0a737a8d4f (patch)
treea92f59a37d92fa1f4dff9b1e139bdf25e4ec8c85 /js
parentf69ad85ef82a1024b297f80b9d9855a60a1f699e (diff)
Fixes #3819
Fixes #3818: you can now call piwikTracker.appendToTrackingUrl('lat=X&long=Y'); _and_ disable auth in your config.ini.php https://github.com/piwik/piwik/blob/master/config/global.ini.php#L411 + Adding test
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 971bd7b600..3c7b989f87 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -401,7 +401,7 @@ if (!this.JSON2) {
exec,
res, width, height, devicePixelRatio,
pdf, qt, realp, wma, dir, fla, java, gears, ag,
- hook, getHook, getVisitorId, getVisitorInfo, setTrackerUrl, setSiteId,
+ hook, getHook, getVisitorId, getVisitorInfo, setTrackerUrl, appendToTrackingUrl, setSiteId,
getAttributionInfo, getAttributionCampaignName, getAttributionCampaignKeyword,
getAttributionReferrerTimestamp, getAttributionReferrerUrl,
setCustomData, getCustomData,
@@ -1064,6 +1064,9 @@ var
// Tracker URL
configTrackerUrl = trackerUrl || '',
+ // This string is appended to the Tracker URL Request (eg. to send data that is not handled by the existin setters/getters)
+ configAppendToTrackingUrl = '',
+
// Site ID
configTrackerSiteId = siteId || '',
@@ -1725,6 +1728,9 @@ var
// tracker plugin hook
request += executePluginMethod(pluginMethod);
+ if (configAppendToTrackingUrl.length) {
+ request += '&' + configAppendToTrackingUrl;
+ }
return request;
}
@@ -2321,8 +2327,17 @@ var
},
/**
- * Get custom data
+ * Appends the specified query string to the piwik.php?... Tracking API URL
*
+ * @param queryString eg. 'lat=140&long=100'
+ */
+ appendToTrackingUrl: function (queryString) {
+ configAppendToTrackingUrl = queryString;
+ },
+
+ /**
+ * Get custom data
+ *skk
* @return mixed
*/
getCustomData: function () {