We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4801d26 commit 95bf9ddCopy full SHA for 95bf9dd
1 file changed
Dist/Functional/CookieConsent.js
@@ -116,6 +116,14 @@ class CookieConsent {
116
.filter(Boolean);
117
}
118
119
+ // Handle Facebook pixel consent if analytics or all is accepted
120
+ if (consentCategories.includes('all') || consentCategories.includes('analytics')) {
121
+ window.localStorage.setItem('fbGrantConsent', 'true');
122
+ if (typeof window.fbq === 'function') {
123
+ window.fbq('consent', 'grant');
124
+ }
125
126
+
127
const consentScripts = document.querySelectorAll('script[wt-cookieconsent-script]');
128
consentScripts.forEach(originalScript => {
129
const scriptCategory = originalScript.getAttribute('wt-cookieconsent-script');
0 commit comments