Warning in Google Pagespeed Insights about Piwik code?

When I run a website with PiwikPro installed in Google Pagespeed Insights I get this warning about the Javascript related to PiwikPro:

“Avoid serving legacy JavaScript to modern browsers”
Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren’t necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers.


(option-webdesign.containers.piwik.pro) 6.9 KiB

(option-webdesign.containers.piwik.pro) Array.prototype.filter

(option-webdesign.containers.piwik.pro) Date.now

(option-webdesign.containers.piwik.pro) Array.prototype.forEach

(option-webdesign.containers.piwik.pro) @babel/plugin-transform-classes

So my question, is this something to worry about, something wrong or out-of-dfate with the Piwik code (installed with the WordPress plugin)?

Thanks for the help,

Hi. I’ll double-check with the team, but most likely it’s because our tracking library has to be compatible also with older browsers. We cannot control what devices and browsers are used by website visitors.

Update: Indeed, it’s for BC. We might consider dropping support for some browsers to get rid of that code.

Thank you for the update kuba :slight_smile: