Skip to content

Commit

Permalink
Merge pull request #441 from matomo-org/440-variable-reset
Browse files Browse the repository at this point in the history
Added code to update dimension even when value is empty or null
  • Loading branch information
tsteur committed Feb 24, 2022
2 parents 7a3173c + 734bdb8 commit 85824f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Template/Tag/MatomoTag.web.js
Expand Up @@ -217,7 +217,7 @@
var dimIndex;
for (dimIndex = 0; dimIndex < matomoConfig.customDimensions.length; dimIndex++) {
var dimension = matomoConfig.customDimensions[dimIndex];
if (dimension && TagManager.utils.isObject(dimension) && dimension.index && dimension.value) {
if (dimension && TagManager.utils.isObject(dimension) && dimension.index && dimension.hasOwnProperty('value')) {
tracker.setCustomDimension(dimension.index, dimension.value);
}
}
Expand Down

0 comments on commit 85824f1

Please sign in to comment.