Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-10680

Google Analytics - add G4 property support

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.4.7, 4.5.0
    • None
    • Plugin : Web
    • None
    • 4.5 M7

      Today if you create Google Analytics account and property. The property is a G4 property (without UA property) 

      Then our code using analytics.js don't records visits on GA.

       

          [CMS-10680] Google Analytics - add G4 property support

          Olivier Gehin added a comment -

          Useful code form Google doc :

           

          <!-- Global site tag (gtag.js) - Google Analytics -->
          <script async src="https://www.googletagmanager.com/gtag/js?id=G-39022S4QZX"></script>
          <script>
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());

          gtag('config', 'G-39022S4QZX');
          </script>

          Olivier Gehin added a comment - Useful code form Google doc :   <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-39022S4QZX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-39022S4QZX'); </script>

            raphael Raphaƫl Franchet
            ogehin Olivier Gehin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: