We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 2900

Summary: Add Google Analytics plugin
Product: OJS Reporter: Alec Smecher <alec>
Component: Plug-insAssignee: Michael Felczak <michael.pkp>
Status: RESOLVED FIXED    
Severity: normal CC: pkp-support
Priority: P1    
Version: 2.2   
Hardware: PC   
OS: Linux   
Version Reported In: Also Affects:
Attachments: Patch against OCS pre-2.1.1 CVS

Description Alec Smecher 2007-06-04 10:58:33 PDT
Add Google Analytics plugin to insert code into page headers.
Comment 1 Alec Smecher 2007-06-04 15:02:48 PDT
This should be implemented as a generic plugin that is able to add code snippets to the headers. That way, it could support a number of different tracking apps, e.g. phpMyVisites, Google Analytics, etc.

It would be nice to allow JMs to drop an icon into the sidebar, but that might be suitable for another plugin, as I could see additional static sidebar content being a valuable general feature.

The $additionalHeadData Smarty template variable is suitable for this, except that it's missing from templates/help/header.tpl and needs to be added.
Comment 2 Michael Felczak 2007-06-07 21:07:03 PDT
An update based on our additional discussions:

- Provide a generic mechanism for adding custom HTML using the existing features in Setup, Step 5, Custom Footer. This requires that the custom footer be extended to articles (Bug #2905).

- Implement the Google Analytics plugin as an easy-to-use, custom plugin.

- The plugin should work on a per-journal basis, as opposed to on a per-site basis.
Comment 3 Michael Felczak 2007-06-13 13:51:44 PDT
Implemented.
Comment 4 Michael Felczak 2008-06-27 13:33:43 PDT
Created attachment 804 [details]
Patch against OCS pre-2.1.1 CVS

Back-ported to OCS.