Update js/m2.metrics.js fixes #59 and #60