简体   繁体   中英

Google consent mode Beta not showing page_view on Google Analytics

Possible duplicates:

I have followed the official documentation , but on Google Analytics dashboard I don't see any data in the real time mode.

     <head>
     <script type="text/javascript>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
             gtag('consent', 'default', {
                  'analytics_storage': 'denied',
                  'wait_for_update': 500
             });
      
             gtag('js', new Date());
             gtag('config', 'UA-1XXXXXXXX-');
     </script>
     </head>

If the "denied" value is updated to "granted", the data shows up on the Google Analytics dashboard. What am I missing here?

Currently, if the Analytics consent is denied, despite the interactions being sent to the Google Analytics servers, the data set in question (characterized by a parameter that identifies the consent method) is not collected / exposed in the reports. So it's normal that you don't see the data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM