DeividasBalysevas

Untitled

Apr 11th, 2024
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. var redact_ad_data = false;
  4. // set "true" to increase the fidelity of advertising storage restrictions
  5. window.dataLayer = window.dataLayer || [];
  6. function gtag() {
  7.     dataLayer.push(arguments);
  8. }
  9.  
  10. gtag("consent", "default", {
  11.     ad_storage: "denied",
  12.     ad_user_data: "denied",
  13.     ad_personalization: "denied",
  14.     analytics_storage: "denied",
  15.     functionality_storage: "denied",
  16.     personalization_storage: "denied",
  17.     security_storage: "granted",
  18.     wait_for_update: 2000,
  19. });
  20.  
  21. gtag("set", "ads_data_redaction", true);
  22. gtag("set", "url_passthrough", true);
  23.  
  24. function CookieLawInfo_Accept_Callback() {
  25.  
  26. if(CLI.consent['advertisement'] == true) {
  27.     gtag('consent', 'update', {
  28.     ad_storage: "granted",
  29.     ad_user_data: "granted",
  30.     ad_personalization: "granted"
  31.     });
  32. }
  33.  
  34. if(CLI.consent['analytics'] == true) {
  35.     gtag('consent', 'update', {
  36.     analytics_storage: "granted",
  37.     functionality_storage: "granted",
  38.     personalization_storage: "granted",
  39.     security_storage: "granted"
  40.     });
  41. }
  42.  
  43. set_ads_data_redaction();
  44.  
  45. }
  46.  
  47.  
  48. function set_ads_data_redaction() {
  49.     if(redact_ad_data && wt_cli_ad_storage == 'denied') {
  50.     gtag('set', 'ads_data_redaction', true);
  51.     }
  52. }
  53.  
  54.  
Advertisement
Add Comment
Please, Sign In to add comment