Microsoft 365 Copilot for Sales
nsentAndYouTube() { WcpConsent.init( locale, bannerId, function (err, siteConsent) { if (err) { console.error("❌ MSCC init error:", err); return; } window._wcpConsent = siteConsent; // 👈 CRITICAL for the link to work // ✅ This ensures the Manage Cookies link will work window._wcpConsent = siteConsent; const consent = siteConsent.getConsent(); console.log("✅ MSCC initialized. Current consent:", consent); if (consent?.Marketing || consent?.SocialMedia) { loadYouTubeEmbeds(); } else { deferYouTubeEmbeds(); } }, onConsentChanged, WcpConsent.themes.light, "test-nonce", { forceShowBanner: true, siteBehavior: { enableAutoConsent: false, allowImplicitConsent: false }, fallbackBehavior: { waitForConsent: true, defaultConsent: { Required: false, Analytics: false, SocialMedia: false, Marketing: false, Advertising: false } } } ); } document.addEventListener("DOMContentLoaded", () => { const waitForMSCC = setInterval(() => { if (window.WcpConsent?.init) { clearInterval(waitForMSCC); initConsentAndYouTube(); } }, 100); }); })();