Results 1 to 3 of 3
  1. #1
    New Pligger johannis's Avatar
    Joined
    Mar 2010
    Posts
    8

    Google analytics code looking for real answer

    I think its disgusting that all the posts on analytics code is half done,i have the same question how to add it.can someone explain precisley,no more pieces of junk,not everyone understands.and yes i have added it before many times but not here on pligg platform

  2. #2
    New Pligger BigPete's Avatar
    Joined
    Mar 2010
    Posts
    26
    In your Header or Footer template (.tpl file) add this

    Code:
    {literal}
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E
    
    %3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("XXXXXXXXXXXXX");
    pageTracker._trackPageview();
    } catch(err) {}</script>{/literal}

    I've just added mine to the footer template just above the <!-- END FOOTER --> and it works fine, remember to replace the ("XXXXXXXXXXXX") with your google analytic code which should start UA-

  3. #3
    Banned channelztv's Avatar
    Joined
    Mar 2007
    Posts
    147
    Google analytics is not that great anyway! I have it in my footers but my local logs differ greatly! And I know my raw server logs are correct.

Similar Threads

  1. How to add google analytics code
    By srrpenna in forum Questions & Comments
    Replies: 19
    Last Post: 05-09-2012, 08:09 PM
  2. Where do I add Google Analytics Code
    By Sadmir in forum Questions & Comments
    Replies: 3
    Last Post: 11-19-2010, 06:04 PM
  3. Pligg V9.9.5 Google Analytics code not working
    By simplesmily in forum Questions & Comments
    Replies: 2
    Last Post: 09-28-2009, 12:21 PM
  4. [SOLVED] Google Analytics Code not working
    By sach4isha in forum Questions & Comments
    Replies: 3
    Last Post: 12-22-2008, 07:53 AM
  5. Google Analytics. Where should code be placed
    By channelztv in forum Questions & Comments
    Replies: 3
    Last Post: 04-11-2007, 06:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting