This week I encounter a weird real time number in my google analytics. The real time number is about 1000 while the active pages is just about 500.

This happens after I put a custom tag manager to track pageviews from each author (with datalayer).

There's no additional GA script in the app. The only script is:

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-xxxxxxxx');</script>

And then immediately after that (I was wondering if this is the cause):

        dataLayer = [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'UA-xxxxxxxxxx-x');
        gtag('config', 'GA_TRACKING_ID', {
          'custom_map': {'dimension1': 'Author'}

Is this behavior normal? Or did I set something wrong?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.