We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4198
    • 4 Posts
    Quote from: bsam at Aug 01, 2008, 12:05 PM

    The plugin code does not seem to result in an exact pattern-match to the Google Analytics supplied code (at least for me)

    So.. on the Google Analytics "Settings" page, the "Status" [says] "Tracking Not Installed".


    UPDATE Oct 30, 2008 - seems to be working properly without any change I know of on my end.
      • 8522
      • 145 Posts
      I am trying GoogleAnalytics for the first time. it is supposed to not include the analytics js file if you are logged in as manager.
      the plugin has this configuration &testMode=Test Mode;list;true,false;false
      but somehow this line fails:
      $devMode = ($testMode)? true : !$inMgr;

      it only works properly for me if i use &testMode=Test Mode;list;1,0;0

      thanks to opengeek i got this line which makes GoogleAnalytics work properly and not include the js for managers.
      $devMode = ($testMode && $testMode !== 'false')? true : !$inMgr;


      please confirm.
      &thanks
      eni
        • 25803 ☆ A M B ☆
        • 721 Posts
        I’ve installed the latest plugin and have a curious issue. The code is rendered out for every single page except the "home" page. Anyone run into this as well?
          • 34162
          • 1 Posts
          I noticed two points that made this plug-in work well.

          point 1
          Need to turn on the site tracking check of each page, or delete this check code.
          && $modx->documentObject['donthit']==0


          point 2
          Modify this Line.
          $devMode = ($testMode)? true : !$inMgr;

          to
          $devMode = ($testMode == 'true')? true : !$inMgr;

          or modify parameter like eerne post
          Quote from: eerne at Oct 30, 2008, 01:34 PM

          it only works properly for me if i use &testMode=Test Mode;list;1,0;0
            • 20557
            • 43 Posts
            For some reason SiteScan (http://www.sitescanga.com/) is telling me that Google Analytics is not properly installed when using the plugin. However, I can see the following code at the bottom of all my pages:

            <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
            <script type="text/javascript">
            var pageTracker = _gat._getTracker("UA-XXXXXX-X");
            pageTracker._initData();
            pageTracker._trackPageview();
            </script>
            


            Am I doing something wrong? Or does the SiteScan not pick up the code because it is not in the exact same format as the standard Google code?

            Thanks,
            Matt
              • 8522
              • 145 Posts
              @MadHyde
              point 1: The feature to be able to exclude ga with site tracking check of each page is very important for me. I don’t see any problem since Enable Stats Tracking is turned on by default for every new document.
              point 2: I included your fix and attached, see below.

              @mtheuma
              I think you will have to wait ~24 hours that google takes to show results. Can you confirm that it is working now?

              @all modx users
              Attached you can find google-analytics-1.4.1.txt plugin. This is a bugfix with fixed check that properly exclude ga when manager is logged in. It is the solution provided by MadHyde earlier in this thread, since his solution doesn’t require to change the Parameters.

              Enjoy!
              eni
                • 34162
                • 1 Posts
                eni, thank you for your update.

                and next thread.
                http://modxcms.com/forums/index.php?topic=39892