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:

Blockquote
“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.

/17672c94-….js?data_layer_name=dataPiPrLayer

(option-webdesign.containers.piwik.pro) 6.9 KiB
/17672c94-….js?data_layer_name=dataPiPrLayer:5:10094

(option-webdesign.containers.piwik.pro) Array.prototype.filter
/17672c94-….js?data_layer_name=dataPiPrLayer:5:13941

(option-webdesign.containers.piwik.pro) Date.now
/17672c94-….js?data_layer_name=dataPiPrLayer:5:14550

(option-webdesign.containers.piwik.pro) Array.prototype.forEach
/17672c94-….js?data_layer_name=dataPiPrLayer:8:2672

(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,
Alwin

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: