Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    New Pligger chiloso's Avatar
    Joined
    Mar 2006
    Posts
    4
    Thanks
    Received:0
    Given: 0

    Google Analytics

    can someone please tell me on what page do i have to put the google analytics code...thanks!!!!!

  2. #2
    Pligg Founder/Coder/Designer Yankidank's Avatar
    Joined
    Dec 2005
    Location
    San Francisco, CA
    Posts
    5,513
    Thanks
    Received:87
    Given: 14
    Site
    http://pligg.com/demo/
    Open up head.tpl from your templates directory.

    Scroll the the bottom of the code.

    Find:
    HTML Code:
        {/literal}
        </head>
    Just above that add a new line and enter this data:
    HTML Code:
     <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "XX-XXXXX-X";
    urchinTracker();
    </script>
    Replace XX-XXXXX-X with your account number, which can be found by logging into google analytics > Click on Edit under the settings table for the URL you want to use > Click on Check Status near the top right of the page. The page you are taken to will have the same <script>.... info as I posted above, only with your user account number where the X's are. Just copy this code into your head.tpl file like I demonstrated above.
    The Facebook Module for Pligg CMS!
    Register, Login, and Submit Stories with Facebook. An absolute MUST HAVE for all Pligg sites!

  3. #3
    Banned r3ddr's Avatar
    Joined
    Nov 2007
    Posts
    45
    Thanks
    Received:0
    Given: 0

    Lightbulb

    maybe in older versions,

    a proper place would be in "templates/yourtemplate/footer.tpl"

  4. #4
    New Pligger johnymunich's Avatar
    Joined
    Jul 2007
    Posts
    18
    Thanks
    Received:0
    Given: 0
    I've put them in the header.tpl, it works fine.

    My Dutch pligg site: MyRiverofLife.nl / Gepubliceerde berichten

  5. #5
    New Pligger darkonen's Avatar
    Joined
    Sep 2007
    Posts
    15
    Thanks
    Received:0
    Given: 0
    It's better idea to put it at the footer, because your webpage will load faster

  6. #6
    Junior Member 3ruce's Avatar
    Joined
    Jan 2009
    Posts
    9
    Thanks
    Received:0
    Given: 0
    Any thoughts on where it should go in 9.9.5?

  7. #7
    Pligg Donor rubber2002's Avatar
    Joined
    Jul 2007
    Posts
    286
    Thanks
    Received:0
    Given: 0
    Irrespective of any version, an ideal place is footer.tpl

  8. #8
    Junior Member 3ruce's Avatar
    Joined
    Jan 2009
    Posts
    9
    Thanks
    Received:0
    Given: 0
    Thanks for that, but I seem to have run into a problem here...
    My footer.tpl file reads like this

    Code:
    <br clear="all" />
    
    <div class="footer">
    	Powered By <a href="http://www.pligg.com/">Pligg</a> | Legal: <a href="http://www.affero.org/oagpl.html">License</a> and <a href="https://sourceforge.net/project/showfiles.php?group_id=176676">Source</a> | Template By <a href="http://www.qkin.com/">Qkin</a> 
    </div>
    
    {* Please do not edit the code below. *}
    {checkActionsTpl location="tpl_footer"}
    <div class="footer" style="display:none">Powered By <a href="http://www.pligg.com/">Pligg</a> Template By <a href="http://www.qkin.com/">Qkin</a></div>
    
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    try {
    _uacct = "UA-6948073-1";
    urchinTracker();
    } catch(err) {}</script>

    Ther error message I get is;

    Code:
    error: _uacct function does not exist (class.compiler.php, line 485) in /home/fourg124/public_html/digforleadership.com/class.template.php on line 923
    Fatal error: TPL: [in silverbullet/footer.tpl line 13]: syntax
    Do you know what I'm doing wrong here?

  9. #9
    Pligg Donor rubber2002's Avatar
    Joined
    Jul 2007
    Posts
    286
    Thanks
    Received:0
    Given: 0
    Quote Originally Posted by 3ruce View Post
    Thanks for that, but I seem to have run into a problem here...
    My footer.tpl file reads like this

    Code:
    <br clear="all" />
    
    <div class="footer">
    	Powered By <a href="http://www.pligg.com/">Pligg</a> | Legal: <a href="http://www.affero.org/oagpl.html">License</a> and <a href="https://sourceforge.net/project/showfiles.php?group_id=176676">Source</a> | Template By <a href="http://www.qkin.com/">Qkin</a> 
    </div>
    
    {* Please do not edit the code below. *}
    {checkActionsTpl location="tpl_footer"}
    <div class="footer" style="display:none">Powered By <a href="http://www.pligg.com/">Pligg</a> Template By <a href="http://www.qkin.com/">Qkin</a></div>
    
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    try {
    _uacct = "UA-6948073-1";
    urchinTracker();
    } catch(err) {}</script>

    Ther error message I get is;

    Code:
    error: _uacct function does not exist (class.compiler.php, line 485) in /home/fourg124/public_html/digforleadership.com/class.template.php on line 923
    Fatal error: TPL: [in silverbullet/footer.tpl line 13]: syntax
    Do you know what I'm doing wrong here?
    This is my code:
    Code:
    <script src="{$my_pligg_base}/js/xmlhttp.php" type="text/javascript"></script>
    		<script src="{$my_pligg_base}/js/jspath.php" type="text/javascript"></script>
    <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">
    var pageTracker = _gat._getTracker("UA-XXXXXX-X");
    pageTracker._trackPageview();
    </script>
    Replace UA-XXXXXX-X with your ID & try. Thanks

  10. #10
    Junior Member 3ruce's Avatar
    Joined
    Jan 2009
    Posts
    9
    Thanks
    Received:0
    Given: 0
    All good here :-)

    Just need el google to suck it and see!

Page 1 of 2 12 LastLast

Similar Threads

  1. How to properly use google analytics?
    By stevenkwok in forum Questions & Comments
    Replies: 4
    Last Post: 02-27-2011, 04:19 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. Google analytics error
    By johannis in forum Questions & Comments
    Replies: 6
    Last Post: 04-17-2010, 09:12 AM
  4. Google Analytics
    By Jake in forum Questions & Comments
    Replies: 3
    Last Post: 12-26-2008, 02:29 PM
  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 Web Hosting Services by Midphase Dreamhost Web Hosting Donate to Pligg