Skip to content

Commit

Permalink
Item1142: -tw*k*
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/GoogleAnalyticsPlugin@2695 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
WillNorris authored and WillNorris committed Feb 25, 2009
1 parent c04b601 commit 1f44334
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
15 changes: 7 additions & 8 deletions data/System/GoogleAnalyticsPlugin.txt
Expand Up @@ -28,35 +28,34 @@ Google presents visitor data in a visually rich dashboard: %BR%

---++ Plugin Installation Instructions

__Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.
__Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the Foswiki server.

* Download the ZIP file from the Plugin web (see below)
* Unzip ==%TOPIC%.zip== in your root ($TWIKI_ROOT) directory. Content:
| *File:* | *Description:* |
| ==data/System/GoogleAnalyticsPlugin.txt== | |
| ==lib/Foswiki/Plugins/GoogleAnalyticsPlugin/build.pl== | |

* Optionally, if it exists, run ==%TOPIC%_installer== to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
* Optionally, if it exists, run ==%TOPIC%_installer== to automatically check and install other Foswiki modules that this module depends on. You can also do this step manually.
* Alternatively, manually make sure the dependencies listed in the table below are resolved.
None
* (Dakar) Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section.
* (Dakar) Visit =configure= in your Foswiki installation, and enable the plugin in the {Plugins} section.

---++ Plugin Info

| Authors: | TWiki:Main.ArthurClemens |
| Authors: | Foswiki:Main.ArthurClemens |
| Copyright ©: | 2006 Arthur Clemens |
| License: | [[http://www.gnu.org/copyleft/gpl.html][GPL]] |
| Plugin Version: | %DATE% (V1.000) |
| Plugin Version: | %DATE% (V1.001) |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 24 Feb 2009 | 1.001 Ported to Foswiki (Foswiki:Main.WillNorris) |
| 21 Sep 2006 | 1.0.0 First Version |
| TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 |
| Foswiki Dependency: | $Foswiki::Plugins::VERSION 2.0 |
| CPAN Dependencies: | none |
| Other Dependencies: | none |
| Perl Version: | 5.005 |
| [[Foswiki:Extensions/Benchmark][Benchmarks]]: | %SYSTEMWEB%.GoodStyle nn%, %SYSTEMWEB%.FormattedSearch nn%, %TOPIC% nn% |
| Home: | http://foswiki.org/Extensions/%TOPIC% |
| Feedback: | http://foswiki.org/Extensions/%TOPIC%Dev |
| Appraisal: | http://foswiki.org/Extensions/%TOPIC%Appraisal |

__Related Topics:__ %SYSTEMWEB%.DefaultPreferences, %USERSWEB%.SitePreferences

Expand Down
12 changes: 5 additions & 7 deletions lib/Foswiki/Plugins/GoogleAnalyticsPlugin.pm
Expand Up @@ -16,16 +16,11 @@ $RELEASE = 'Dakar';

$pluginName = 'GoogleAnalyticsPlugin';

#there is no need to document this.
################################################################################

sub initPlugin {
my( $topic, $web, $user, $installWeb ) = @_;

# check for Plugins.pm versions
if( $Foswiki::Plugins::VERSION < 1.1 ) {
Foswiki::Func::writeWarning( "Version mismatch between $pluginName and Plugins.pm" );
return 0;
}

$debug = Foswiki::Func::getPluginPreferencesFlag( "DEBUG" );
# Get plugin preferences, variables defined by:
# * Set GOOGLESITEKEY = ...
Expand All @@ -35,6 +30,8 @@ sub initPlugin {
return 1;
}

################################################################################

sub _addToHead {

my $header = '<!-- Google Analytics script -->
Expand All @@ -53,4 +50,5 @@ sendStats();
Foswiki::Func::addToHEAD('GOOGLEANALYTICSPLUGIN',$header)
}

################################################################################
1;

0 comments on commit 1f44334

Please sign in to comment.