diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-05-09 06:29:09 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-05-09 06:29:09 +0400 |
commit | 8f4ab8c0cb163a411eac27b33fdee8ffb69459d4 (patch) | |
tree | 8248d2bfdb78409dfe9c91bad529d8c55b7e530d /js | |
parent | 9bb1427dec1c198844a816f9d550554532235150 (diff) |
Fixes #5118 getRequest() method returns the query string of Tracking API HTTP request + tests
Close PR#243
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/js/piwik.js b/js/piwik.js index d9e298f1f7..a714d0e923 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, setTrackerUrl, appendToTrackingUrl, setSiteId, + hook, getHook, getVisitorId, getVisitorInfo, setSiteId, setTrackerUrl, appendToTrackingUrl, getRequest, getAttributionInfo, getAttributionCampaignName, getAttributionCampaignKeyword, getAttributionReferrerTimestamp, getAttributionReferrerUrl, setCustomData, getCustomData, @@ -2443,6 +2443,15 @@ if (typeof Piwik !== 'object') { }, /** + * Get custom data + * + * @return mixed + */ + getCustomData: function () { + return configCustomData; + }, + + /** * Appends the specified query string to the piwik.php?... Tracking API URL * * @param string queryString eg. 'lat=140&long=100' @@ -2452,15 +2461,16 @@ if (typeof Piwik !== 'object') { }, /** - * Get custom data + * Returns the query string for the current HTTP Tracking API request. + * Piwik would prepend the hostname and path to Piwik: http://example.org/piwik/piwik.php? + * prior to sending the request. * - * @return mixed + * @param request eg. "param=value¶m2=value2" */ - getCustomData: function () { - return configCustomData; + getRequest: function (request) { + return getRequest(request); }, - /** * Set custom variable within this visit * |