OpenWetWare:Software/Extensions/Analytics/GoogleAnalytics

From OpenWetWare

< OpenWetWare:Software | Extensions(Difference between revisions)
Jump to: navigation, search
Current revision (19:51, 1 March 2008) (view source)
m (just a couple typos)
 
Line 1: Line 1:
-
Note: This extension is now turned on. The extension is not present in the DefaultExtensions.php file. It it only loaded for the OpenWetWare.org doamin.
+
Note: This extension is now turned on. The extension is not present in the DefaultExtensions.php file. It it only loaded for the OpenWetWare.org domain.
-
If anyone using a private wiki wants to get their own Google Analytics number, follow the directions below. The code muse be placed in the /wikis/<private wikiname>/WikiSettings.php file at the bottom.  
+
If anyone using a private wiki wants to get their own Google Analytics number, follow the directions below. The code must be placed in the /wikis/<private wikiname>/WikiSettings.php file at the bottom.  
{{extension
{{extension

Current revision

Note: This extension is now turned on. The extension is not present in the DefaultExtensions.php file. It it only loaded for the OpenWetWare.org domain.

If anyone using a private wiki wants to get their own Google Analytics number, follow the directions below. The code must be placed in the /wikis/<private wikiname>/WikiSettings.php file at the bottom.

         
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Error creating thumbnail: convert: unrecognized color `linearGradient3310) rgb(0, 0, 0'.
convert: unable to open image `linearGradient3310) rgb(0, 0, 0': No such file or directory.
convert: Non-conforming drawing primitive definition `fill'.
Google Analytics

Release status: stable

Implementation  User activity
Description Automatically inserts Google Analytics tracking code at the bottom of MediaWiki pages
Author(s)  Tim Laqua
Last Version  1.2 (08-26-2007)
MediaWiki  1.10+
License No license specified
Download MediaWiki SVN
Example  www.PoxWiki.com

This extension inserts Google Analytics tracking code in every MediaWiki page that is viewed. The extension excludes pages being viewed by users with 'protect' privileges (sysops) and users with 'bot' privileges (bots) to prevent pollution of the statistics.

Installation

  1. Create a new folder (directory) in the following location:
    wiki-install-folder/extensions/googleAnalytics
  2. Download the googleAnalytics.php file from SVN
  3. Copy googleAnalytics.php in to the new googleAnalytics folder
  4. Add the following code to your LocalSettings.php at the bottom
//Replace xxxxxxx-x with YOUR GoogleAnalytics UA number
$googleAnalytics = "UA-xxxxxxx-x";
 
//Set to true if you are using the Monobook skin (uses a Monobook-specific hook)
//This setting is ignored for MW 1.11+ (SkinAfterBottomScripts is used instead)
$googleAnalyticsMonobook = true;
 
require_once( "$IP/extensions/googleAnalytics/googleAnalytics.php" );

Usage

  1. Create a Google Analytics account
  2. Locate your UA number (found in the chunk of code that they provide you
    _uacct=UA-xxxxxxx-x
  3. Follow Installation Instructions
  4. Google Analytics stats should start populating within 24-48 hours.

More info

Personal tools