Welcome to Geeklog, Anonymous Sunday, October 13 2024 @ 12:17 pm EDT

Geeklog Forums

Google Analytics


businessmasters

Anonymous
curious
Hi

Google has just released the former Urchin analytics program as a free program which is used by many large corporations. Great program. Forget having to pay hundreds of dollars for a web analytics solution. Get it free.

On that topic...

I was wondering if a plugin for Google Analytics is available. There are quite a number of plugins available for Wordpress already.

Anyone got one they want to share?
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
You only have to put the Google Analytics Javascript in header.thtml, just behind the metatags, thats it.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

greenhil

Forum User
Chatty
Registered: 07/20/04
Posts: 51
i just got my invitation today to use it but i cannot get my site recognized.

i placed the code in the header.thml and it appears to be placed correctly..but google does not see it.

any ideas?
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
It might take a few days, be patient
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

greenhil

Forum User
Chatty
Registered: 07/20/04
Posts: 51
thanks for the quick reply!

i know the analytics can take a day or so but google validates that the code is detected correctly during setup and it does not detect it in my geeklog site.

i did a second site that is not geeklog and it validated immediately.
here is my header.thtml:


Text Formatted Code
<?php header ('Content-Type: text/html; charset={charset}'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>{page_title}</title>
<meta name="ROBOTS" content="INDEX,FOLLOW">

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-215215-2";
urchinTracker();
</script>

<!-- link rel="SHORTCUT ICON" href="{site_url}/favicon.ico" -->
<!--
<meta http-equiv="Pragma" content="no-cache">
-->
<link rel="stylesheet" type="text/css" href="{css_url}" title="{theme}">

<!-- Load FCKEditor -->
<link rel="stylesheet" type="text/css" href="{site_url}/fckeditor/css/fck_editorarea.css">
<script type="text/javascript" src="{site_url}/fckeditor/fckeditor.js" type="text/javascript"></script>
<!--END of FCKEditor -->


<script type="text/javascript" language="JavaScript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src = '{layout_url}/images/navbar/' +a[i];}}
}
 
 Quote

Status: offline

kino

Forum User
Newbie
Registered: 06/14/06
Posts: 14
Location:Japan
lib-common.php

Text Formatted Code

function COM_siteFooter( $rightblock = -1, $custom = '' )
{
     global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic;
    .
    .
    .
    $function = $_CONF['theme'] . '_siteFooter';

    if( function_exists( $function ))
    {
        return $function( $rightblock );
    }
    .
    .
    .
    // Return resulting HTML
    return $footer->finish( $footer->get_var( 'index_footer' ));    
}
 


change to

Text Formatted Code

function COM_siteFooter( $rightblock = -1, $custom = '' )
{
     global $_CONF, $_TABLES, $LANG01, $_PAGE_TIMER, $topic;
    .
    .
    .
    $function = $_CONF['theme'] . '_siteFooter';

    $ga_code = '<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
        </script>
        <script type="text/javascript">
        _uacct = "UA-XXXXXXX-X";
        urchinTracker();
        </script>';
    if( function_exists( $function ))
    {
//        return $function( $rightblock );
    $footer_result = $function( $rightblock);
    $result = mbereg_replace("</body>", $ga_code . "</body>", $footer_result);
    return $result ;
    }
    .
    .
    .
    // Return resulting HTML
//    return $footer->finish( $footer->get_var( 'index_footer' ));    

    $footer_result = $footer->finish( $footer->get_var( 'index_footer' ));
    $result = mbereg_replace("</body>", $ga_code . "</body>", $footer_result);
    return $result;
}
 

 Quote

Status: offline

monoclast

Forum User
Junior
Registered: 07/08/06
Posts: 26
I just inserted it just before the </body> tag in my footer.thtml file and it did the trick!
-mono
 Quote

All times are EDT. The time is now 12:17 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content