mirror of
https://github.com/microsoft/language-server-protocol.git
synced 2025-12-23 08:48:16 +00:00
fix consent check
This commit is contained in:
parent
ce8cc7ec90
commit
0dce41ef87
1 changed files with 1 additions and 6 deletions
|
|
@ -11,16 +11,11 @@ function loadAnalytics(gtag) {
|
|||
}
|
||||
|
||||
function onConsentChanged() {
|
||||
if (!consentRequired()) {
|
||||
return;
|
||||
}
|
||||
|
||||
function gtag() {
|
||||
window.dataLayer.push(arguments)
|
||||
}
|
||||
|
||||
// Where we would handle non-essential cookies in the future
|
||||
if (WcpConsent.siteConsent.getConsentFor(WcpConsent.consentCategories.Analytics)) {
|
||||
if (!consentRequired() || WcpConsent.siteConsent.getConsentFor(WcpConsent.consentCategories.Analytics)) {
|
||||
// Load GA
|
||||
loadAnalytics(gtag)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue