diff --git a/data/System/GoogleAnalyticsPlugin.txt b/data/System/GoogleAnalyticsPlugin.txt
index 8d837cd..5f2f15f 100644
--- a/data/System/GoogleAnalyticsPlugin.txt
+++ b/data/System/GoogleAnalyticsPlugin.txt
@@ -21,8 +21,14 @@ Google presents visitor data in a visually rich dashboard: %BR%
---++ Settings
* Google provides its users with a piece of html to copy-paste into pages. You only need one piece of it, the value of =_uacct=:
+ * Set this value in [[%SYSTEMWEB%.SitePreferences]]
* Set GOOGLESITEKEY =
+ * Add to your SKIN or COVER setting
+ * Set SKIN = googleanalytics,pattern
+ * Set SKIN = googleanalytics,widgets
+ * Set SKIN = googleanalytics,nat
+
* One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
* Set SHORTDESCRIPTION = Adds Google Analytics !JavaScript code to all pages
@@ -31,14 +37,11 @@ Google presents visitor data in a visually rich dashboard: %BR%
__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 ($FOSWIKI_ROOT) directory. Content:
- | *File:* | *Description:* |
- | ==data/System/GoogleAnalyticsPlugin.txt== | |
-
+ * Unzip ==%TOPIC%.zip== in your root ($FOSWIKI_ROOT) directory.
* 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 Foswiki installation, and enable the plugin in the {Plugins} section.
+ * Visit =configure= in your Foswiki installation, and enable the plugin in the {Plugins} section.
---++ Plugin Info
diff --git a/lib/Foswiki/Plugins/GoogleAnalyticsPlugin.pm b/lib/Foswiki/Plugins/GoogleAnalyticsPlugin.pm
index 514a2fc..c911705 100644
--- a/lib/Foswiki/Plugins/GoogleAnalyticsPlugin.pm
+++ b/lib/Foswiki/Plugins/GoogleAnalyticsPlugin.pm
@@ -14,6 +14,8 @@ $VERSION = '$Rev$';
# of the version number in PLUGINDESCRIPTIONS.
$RELEASE = 'Dakar';
+our $NO_PREFS_IN_TOPIC = 1;
+
$pluginName = 'GoogleAnalyticsPlugin';
################################################################################
@@ -21,34 +23,8 @@ $pluginName = 'GoogleAnalyticsPlugin';
sub initPlugin {
my( $topic, $web, $user, $installWeb ) = @_;
- $debug = Foswiki::Func::getPluginPreferencesFlag( "DEBUG" );
- # Get plugin preferences, variables defined by:
- # * Set GOOGLESITEKEY = ...
- $googleSiteKey = Foswiki::Func::getPluginPreferencesValue( "GOOGLESITEKEY" );
-
- _addToHead();
return 1;
}
-################################################################################
-
-sub _addToHead {
- my $header = q|
-
-|;
-
- Foswiki::Func::addToHEAD('GOOGLEANALYTICSPLUGIN',$header)
- }
-
################################################################################
1;
diff --git a/templates/foswiki.googleanalytics.tmpl b/templates/foswiki.googleanalytics.tmpl
new file mode 100644
index 0000000..9968330
--- /dev/null
+++ b/templates/foswiki.googleanalytics.tmpl
@@ -0,0 +1,22 @@
+%{ This is a Google Analytics template }%%TMPL:INCLUDE{"foswiki"}%
+
+%TMPL:DEF{"googleanalytics"}%\
+
+
+ %TMPL:END%
+
+%TMPL:DEF{"bodyend"}%
+
+xxx
+%TMPL:P{"googleanalytics"}%
+