I may of spoken too soon. I have it set in both a cpgnuke installation and a phpnuke 7.0 installation (both were slightly different) and when viewing the source of the page ofter the addition of the code, it's all there, between the head tags and with proper formatting.
However, when using the "Verify" link on the Google Analytics (GA) page, it fails to see the code as inserted, and after a full day of waiting for GA to log info, it's only showing a single hit on my cpg site and no traffic at all on the PHPNuke site, and I know that there should be more since I've personally been to both of them since then more than one time as well as some other stat trackers I have running showing others going to them.
Regardless, here's how I added the code in case you want to test. In my cpgnuke version, I added it to header.php:
After a full 24 hours I've gone back and looked at my stats on the 2 sites, and it appears they're working fine now. The Check Status links in the setup still show as not working but, I emailed Google Analytics before the stats showed and this is the reply I got:
Quote:
Hello,
Thank you for your email.
I understand that you have some concerns about data not appearing in your account. We appreciate your interest in Google Analytics and hope to have your reports populated as soon as possible. Since we have received an unexpected demand for Google Analytics, there have been some delays reporting data since launch. I'd like to give you an overview of what to expect going forward:
- The "Check Status" feature is currently not accurate. If you added the code to your pages correctly, then we are collecting data. You can make sure by seeing if your site has set "_utm" cookies in your browser.
- If your reports aren't currently populated, they will be as soon as the next processing run is complete. We process every 24 hours.
- You may see some reports within a profile before others. We're populating reports like this to get you as much information as soon as we can. If you see this, rest assured that all applicable reports will show data soon.
- Once we catch up with the data for your account, you'll see new reports every 24 hours.
For additional questions, please visit the Analytics Help Center at http://www.google.com/support/analytics. If you're unable to find an answer to your question on our site, please feel free to reply to this email.
##################################################
# Include some common header for HTML generation #
##################################################
function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
$ThemeSel = get_theme();
include_once("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "<title>$sitename $pagetitle</title>\n";
include("includes/meta.php");
include("includes/javascript.php");
// Google Analytics Code
echo "<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\">\n";
echo "</script>\n";
echo "<script type=\"text/javascript\">\n";
echo "_uacct = \"UA-555555-2\";\n";
echo "urchinTracker();\n";
echo "</script>\n\n";
// End Google Analytics Code
per the google site, it has to be in the hte <head> tags after the </meta tag> before the </head>
so basically it has to be like this
Code:
<head>
blah blah blah
<meta>
meta blah blah bla
meta blah blah bla
</meta>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-134401-1";
urchinTracker();
</script>
</head>
after all this i went to the google site, and it is showing me that all is well, that its installed properly, and i should have reports in the next 12 hours.
How can we present the resulting analisis page to someone else? Can we present the XML code as a html page?
I would like to show the following stats to my members:
But I would like it to be updated automatically without my intervention.
Any ideas?
saaa Nuke Cadet
Joined: Nov 18, 2006
Posts: 7
Posted:
Fri Jan 26, 2007 6:40 pm
Placing the code in header.php worked great for me!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum