What steps will reproduce the problem?
1. Change/update the _ga.extractParamFromUri_
2.
3.
What is the expected output? What do you see instead?
The expected output is a clean uri. The output currently is: undefined
What version of the product are you using? On what operating system?
v5, Google Chrome, Mozilla Firefox, Safari and IE.
Please provide any additional information below.
In order to get the function working and return the uri: the function needs to
be replaced with:
/**
* Extracts a query parameter value from a URI.
* @param {string} uri The URI from which to extract the parameter.
* @param {string} paramName The name of the query paramater to extract.
* @return {string} The un-encoded value of the query paramater. underfined
* if there is no URI parameter.
* @private
*/
_ga.extractParamFromUri_ = function(uri, paramName) {
if (!uri) {
return;
}
var uri = uri.split('#')[1]; // Remove anchor.
var parts = uri.split('?'); // Check for query params.
if (parts.length != 1) {
return;
}
var query = decodeURI(parts[0]);
// Find url param.
paramName += '=';
var params = query.split('&');
for (var i = 0, param; param = params[i]; ++i) {
if (param.indexOf(paramName) === 0) {
return unescape(param.split('=')[1]);
}
}
return;
};
Original issue reported on code.google.com by kay.heu...@gmail.com on 6 Oct 2011 at 7:12
Original issue reported on code.google.com by
kay.heu...@gmail.com
on 6 Oct 2011 at 7:12