@piaolingxue opened this Pull Request on March 26th 2014

when the param in link contains download extensions, it will match the old downlod extensions pattern.

var downloadExtensionsPattern = new RegExp('\.(' + 'jpg' + ')([?&#]|$)', 'i');
// the result will be true

// if we fix the download extensions pattern as follows
var downloadExtensionsPattern = new RegExp('^[^\\?]+\.(' + 'jpg' + ')([?&#]|$)', 'i');
// then it will be false

Although I think the better solution is to support customizing the downloadExtensionsPattern.

@mattab commented on March 26th 2014 Member

see: https://travis-ci.org/piwik/piwik/jobs/21567451
it fails the build "download file.zip (is param) "
because actually this feature is by design... so won't fix

PS: you can already customise the download extensions: http://developer.piwik.org/api-reference/tracking-javascript#changing-the-list-of-file-extensions-to-track-as-downloads

This Pull Request was closed on March 26th 2014
Powered by GitHub Issue Mirror