Skip to content

Commit

Permalink
Fixed: force disable Consent Mode when MA4 is selected.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Sep 25, 2024
1 parent 7d8cec9 commit 6a5be2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/caos-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,15 @@ jQuery(document).ready(function ($) {
}
},

/**
*
*/
maybe_disable_consent_mode: function () {
let value = this.value;
let allow_tracking_option = $('input[name="caos_settings[allow_tracking]"]:checked');

if (value === 'minimal_ga4' && allow_tracking_option.val() === 'consent_mode') {
allow_tracking_option.attr('checked', false);
$('.allow-tracking-').attr('checked', true);
$('.allow-tracking-')[0].checked = true;
}
},

Expand Down

0 comments on commit 6a5be2c

Please sign in to comment.