Google Analytics showing no data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • openminded790
    New Member
    • Jun 2016
    • 11
    • 5.0.x

    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?
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24288
    • 6.0.X

    #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
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • openminded790
      New Member
      • Jun 2016
      • 11
      • 5.0.x

      #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

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24288
        • 6.0.X

        #4
        Yes, remove the two script tags.
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • openminded790
          New Member
          • Jun 2016
          • 11
          • 5.0.x

          #5
          Thanks Mark, seems to be working now!

          Comment

          • glennrocksvb
            Former vBulletin Developer
            • Mar 2011
            • 4021
            • 5.7.X

            #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.

            Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

            Comment

            Related Topics

            Collapse

            Working...