Skip to content

Commit

Permalink
Update consent.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Sioweb authored Feb 19, 2021
1 parent 8b625fb commit 6642bb7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions consent/consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,26 @@

swConsent.extend({
loadAllowedTools: function() {
if(window.ci_consent !== undefined) {
for(var tool in window.ci_consent) {
if(window.gtm_consent_tags !== undefined) {
for(var tool in window.gtm_consent_tags) {
if(swConsent.urlContains('local_gtm_bar=1')) {
if(swConsent.checkUserConsent(tool)) {
if(swConsent.showDebug) {
console.log('load', tool, 'tool');
}
window.ci_consent[tool]();
window.gtm_consent_tags[tool]();
} else if(swConsent.showDebug) {
console.log('Tool', tool, 'cannot be loaded, permissions denied!');
}
} else {
window.ci_consent[tool]();
window.gtm_consent_tags[tool]();
if(swConsent.showDebug) {
console.log('tool', tool, 'loaded');
}
}
}
} else if(swConsent.showDebug) {
console.log('window.ci_consent seams to be undefined', window);
console.log('window.gtm_consent_tags seams to be undefined', window);
}
}
});
Expand Down

0 comments on commit 6642bb7

Please sign in to comment.