Announcement

Collapse
No announcement yet.

Google Analytics showing no data

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

  • Google Analytics showing no data

    Hey all,

    I added my tracking code, <script>.... in the 'google analytics' tracking window under my vbulletin options.

    I thought this was the right thing to do but my GA is showing no data.

    I've since put the ID code, (it's like 10 letters/numbers), hoping this will work.

    Is it the right thing to do?

  • #2
    What is the exact code you are pasting in?

    Remember when you enter the code in the admincp, you need to remove the opening and closing script tags.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.5.4 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #3
      I'm pasting in this,

      <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','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-79203135-1', 'auto');
      ga('send', 'pageview');

      </script>

      So I assume I paste in this?,

      (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','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-79203135-1', 'auto');
      ga('send', 'pageview');

      Thank you for your response Mark

      Comment


      • #4
        Yes, remove the two script tags.
        MARK.B | vBULLETIN SUPPORT

        TalkNewsUK - My vBulletin 5.5.4 Demo
        AdminAmmo - My Cloud Demo

        Comment


        • #5
          Thanks Mark, seems to be working now!

          Comment


          • #6
            This is a common mistake from users who didn't notice in the note in AdminCP that script tags should not be included. And in some cases they are not aware that it's broken. The note should be probably be in red font or have a check in the template before inserting the code to programmatically check if script tags exist. If yes, do not include them, otherwise, include them.

            GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

            Comment

            Related Topics

            Collapse

            Working...
            X