Google Analytics

From HYCOM

Revision as of 19:12, 24 September 2009 by Michael.mcdonald (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page outlines the basic steps for enabling Google Analytics on certain we services.

phpLDAPadmin

  • cd to the phpLDAPadmin web root folder and then into the "lib" folder
  • create a html file called google_analytics.html with the plain text/html of the Google Analytics tracking code
<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("TRACKERNUMBER");
pageTracker._trackPageview();
} catch(err) {}</script>
  • Replace TRACKERNUMBER with your Google Analytics tracking ID
  • Edit the file "page.php" in the same lib folder
  • Search for the phrase "Finish HTML"
  • Below the echo statement for "</table>" closing add the following line
include('google_analytics.html');
  • Save this file and you should now start seeing results in Google Analytics for phpLDAPadmin
Personal tools