diff --git a/src/js/lib/analytics.js b/src/js/lib/analytics.js index 3e4583b..f7faada 100644 --- a/src/js/lib/analytics.js +++ b/src/js/lib/analytics.js @@ -44,7 +44,8 @@ export class AnalyticsManager { } - addMatomoScript() { + //need the arrow function syntax for 'this' to be defined + addMatomoScript = () => { var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];