It is not a good practice to use window like that https://github.com/google/data-layer-helper/blob/master/src/helper/data-layer-helper.js#L379 In particular when a package is installed in the project via NPM.