Announcement

Collapse
No announcement yet.

Switching to Google Universal Analytics .....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Switching to Google Universal Analytics .....

    Hi

    Upgraded my analytics account to the new Universal Analytics from Google, and replaced old code which was working with the new code, see sample below, once i did this it looks like something is not working as traffic is 75% down as soon as i made the change.

    Can vB 4.2.2 work with the new code ?


    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-xxxxxxxx-x', 'example.com');
    ga('send', 'pageview');

    </script>

    On Google analytics it does give this option:
    PHP ImplementationOPTIONAL


    Create a PHP file named "analyticstracking.php" with the code above and include it on each PHP template page. Then, add the following line to each template page immediately after the opening <body> tag:
    <?php include_once("analyticstracking.php") ?>

    Has anyone upgraded there analytics code to the new Universal Analytics if so did it work ok and what templates did you paste it into ?





  • #2
    I believe the javascript code with the <script> tags is just the same, it is the php code that's new that has to go in a php (as opposed to html) page, the difference between the two is that javascript only tracks real users (with a browser) but the php code also tracks bots.

    Comment


    • #3
      Thanks Donald But what do i need to do to get it fixed ? Surely there is someone who has updated there Analytics to the new code...

      Comment


      • #4
        As I said, I doubt if there has been any change to the javasript code and if you suspect all your traffic is not being recorded, best ask here https://productforums.google.com/for...orum/analytics even better, if you have your own hosting use your own analytics for free instead of sharing your data with google here.

        Comment


        • #5
          Did anyone else have this problem or know what the issue was ?

          Comment


          • #6
            i have same problem...
            please help us...

            i install this addon but not working...
            http://www.vbulletin.org/forum/showt...=259340&page=3

            maybe this option working but how can we do?
            Create a PHP file named "analyticstracking.php" with the code above and include it on each PHP template page. Then, add the following line to each template page immediately after the opening <body> tag:
            <?php include_once("analyticstracking.php") ?>

            Comment


            • #7
              This is google code not vbulletin, ideally ask them at via the link in post #4 or ask at www.vbulletin.org for help with a custom page for googles new code.

              Comment

              Related Topics

              Collapse

              Working...
              X