Skip to content

Make Matomo JS Tracker work in strict mode #14791

@alexyeunghk01

Description

@alexyeunghk01

as I am using es6 module and import piwik.js via npm package, every dependency are in js strict mode
It will show error ReferenceError: JSON_PIWIK is not defined

Can we wrap all global variables with window.? It seems can fix the issue easily, I am ok to open PR to do it

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.Help wantedBeginner friendly issues or issues where we'd highly appreciate community's help and involvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions