We have been trying out uMunge and found an error that occur on our staging site (when ClientDependency has minified the Javascript). The error that shows is:
ReferenceError: gaEvent is not defined
I think there are actually 2 issues in the javascript that are both due to variables that are used without being defined using var. I guess this means they are ending up in the global scope, but something in the ClientDependency minification means that these variables are no longer accessible when they are used later in the code.
The first one is here (uMungeDashboardController.js:26):
gaEvent = function (evName, evLabel, evValue) {
This should be var gaEvent at the start. And likewise here (uMungeDashboardController:374):
for (assemblyBigName in buildInfo) {
Should be var assemblyBigName.
Thanks for making this package - certainly useful as we're working out how we can comply with the GDPR.
Javascript error on staging environment
Hi Alan,
We have been trying out uMunge and found an error that occur on our staging site (when ClientDependency has minified the Javascript). The error that shows is:
I think there are actually 2 issues in the javascript that are both due to variables that are used without being defined using
var
. I guess this means they are ending up in the global scope, but something in the ClientDependency minification means that these variables are no longer accessible when they are used later in the code.The first one is here (uMungeDashboardController.js:26):
This should be
var gaEvent
at the start. And likewise here (uMungeDashboardController:374):Should be
var assemblyBigName
.Thanks for making this package - certainly useful as we're working out how we can comply with the GDPR.
Hi Michael,
Thanks for the really constructive feedback - sorry about this bug which we didn't notice when testing locally.
We've implemented your suggested changes and published a new version available for download now.
All the best!
Alan
is working on a reply...