diff --git a/adev/src/app/core/services/analytics/analytics.service.ts b/adev/src/app/core/services/analytics/analytics.service.ts index 74d2483c23922..94ab0c999da64 100644 --- a/adev/src/app/core/services/analytics/analytics.service.ts +++ b/adev/src/app/core/services/analytics/analytics.service.ts @@ -64,6 +64,19 @@ export class AnalyticsService { window.gtag = function () { window.dataLayer?.push(arguments); }; + + // Cookie banner consent initial state + // This code is modified in the @angular/docs package in the cookie-banner component. + // Docs: https://developers.google.com/tag-platform/security/guides/consent + window.gtag('content', 'default', { + ad_user_data: 'denied', + ad_personalization: 'denied', + ad_storage: 'denied', + analytics_storage: 'denied', + personalization_storage: 'denied', + wait_for_update: 500 + }); + window.gtag('js', new Date()); // Configure properties before loading the script. This is necessary to avoid