1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Help] Google Analytics

Discussion in 'White Hat SEO' started by tjalle, Jul 29, 2013.

  1. tjalle

    tjalle Newbie

    Joined:
    Jul 23, 2013
    Messages:
    1
    Likes Received:
    0
    My problem is that my google analytic tracking code doesn't seem to work. I inserted the code right before the closing </body> but its still showing up as "Status: Tracking Not Installed"

    So this is my code with the tracking code, and as you might discover pretty fast, this is not a dynamic website or anything, so it should work by simply insterting the code?

    code:
    Code:
    <html>
    <head>
    
    <title>League of Legends Working MapHack 2013</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="description" content="A working maphack for league of legends">
    <meta name="keywords" content="A working maphack for league of legends , lol maphack , maphack , league of legends maphack , lol cheats, lol hack , hack league of legends">
    <meta name="author" content="LOL MAPHACK">
    
    <div align="center"><img src="background.jpg" draggable="false"   class="bg"></div>
    <style type="text/css">
    .bg {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -5000;
    }
    </style>
    </head>
    
    <body>
    
    <script language=JavaScript> var message="Function Disabled!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script>
    <img src="fb.png" style="position:absolute; top: 16%;  left:91%;" draggable="false"  />
    
    
    <script language=JavaScript> var message="Function Disabled!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script>
    
    
    <a href="youtube.html" ><img src="youtube.png" style ="position:absolute; top: 30%;  left:91%;" draggable="false"  /></a>
    
    
    <a href="contact.html"><img src="contact.png" style="position:absolute; top: 45%;  left:91%;" draggable="false"  /></a>
    
    <a href="faq.html"><img src="question2.png" style="position:absolute; top: 60%;  left:91%;" draggable="false"  /></a>
    
    
    <img src="logo.png" style="position:absolute; top: 9%;  left:47%;"  draggable="false"   />
    
    <img src="homepage.png" style="position:absolute; top: 4%;  left:91%;" draggable="false"  />
    
    <img src="maphack.jpg" style="position:absolute; top: 20%;  left:49%;" draggable="false"  />
    
    <img src="text.jpg" style="position:absolute; top: 85%;  left:10%;" draggable="false"  />
    
    <a href="fileblckrDOTcom/download/JE9ul" target="_blank"><img src="download.png" style="position:absolute; top: 74%;  left:51%;" draggable="false"  /></a>
    
    <a href="screenshots.html" ><img src="screenshots.png" style="position:absolute; top: 73%;  left:91%;" draggable="false"  /></a>
    
    <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','//google-analytics/analytics.js','ga');
    
      ga('create', 'UA-42802272-1', 'mysiteDOTcom');
      ga('send', 'pageview');
    
    </script>
    </body>
     
  2. GreyKnight

    GreyKnight Regular Member

    Joined:
    Mar 19, 2013
    Messages:
    399
    Likes Received:
    200
    Home Page:
    You should put in on the <head> instead of the <body>
    Quoted from Google Analytics :

    1. Copy and place the code snippet
      Once you find the code snippet, copy and paste it into your web page, just before the closing </head> tag*. If your website uses templates to generate pages, enter it just before the closing </head> tag in the file that contains the<head> section. (Most websites re-use one file for common content, so it's likely that you won't have to place the code snippet on every single page of your website.)

      For the best performance across all browsers we suggest you position other scripts in your site in one of these ways:
      • before the tracking code snippet in the <head> section of your HTML
      • after both the tracking code snippet and all page content (e.g. at the bottom of the HTML body)
     
    • Thanks Thanks x 1
  3. Endire

    Endire Elite Member Premium Member

    Joined:
    Mar 27, 2012
    Messages:
    1,756
    Likes Received:
    1,061
    Gender:
    Male
    Tjalle,

    I agree. Many problems with tracking code happen because it is placed later on in the page. You have a lot of other Javascript being executed before the tracking code and that could be the issue. Put it in the head and should be fine.

    Also (and foregive me if you did this on purpose) but the URL in your code doesn't look legitimate.

    Best,
    Shawn
     
  4. gullsinn

    gullsinn Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 24, 2009
    Messages:
    2,429
    Likes Received:
    2,210
    Gender:
    Male
    Occupation:
    Jobless :D
    Location:
    Graveyard
    Home Page:
    You can join GA forum and there are many people.