Modify

Opened 13 years ago

Last modified 13 years ago

#9087 new defect

Fixes and enhancements for this plugin

Reported by: Dennis McRitchie <dmcr@…> Owned by: astei
Priority: normal Component: GoogleAnalyticsIntegration
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

This plugin would not build under Trac 12.1 out of the box. It also did not correctly identify internal/external links on an https website. I made the following changes, and have included a patch for them against r8182 (latest version):

1) Fixed imports to allow the plugin to build, given the new directory name and structure.

2) The inserted code had some problems: a) Since ${base_url} always evaluates to an http-prefixed URL, even when the website is using https, all links evaluated as external. Fixed by removing the http prefix before comparisons. b) Fixed subdomain support to be consistent with Google's latest documentation. c) Ignored source browser views of files with trackable extensions since this would double-count them.

3) Changed the installed plugin name to be the new name (GoogleAnalyticsIntegration) and upped the version to 0.3 .

4) Fixed the CSS file to properly display the admin page.

5) Changed the trac.ini section name from google.analytics to googleanalyticsintegration to avoid possible future conflicts with other google-related plugins.

6) Improved some of the descriptions and documentation; notably, changed UID to 'Web Property ID" to be consistent with current Google usage. Also updated the code snippet in which to find it.

7) Moved AdSense policy violation disclaimer from admin page to LICENSE file, since this plugin does not directly involve AdSense.

8) Removed the financial contribution section from the admin page since this was an unfinished and unbuildable plugin.

Let me know if you have any questions, or want me to commit these changes.

Dennis

Attachments (1)

googleanalyticsintegration_r8182.hxxp.patch (25.9 KB) - added by Dennis McRitchie <dmcr@…> 13 years ago.
Patch to fix plugin for Trac 0.12.1 (with http replaced by hxxp)

Download all attachments as: .zip

Change History (3)

comment:1 Changed 13 years ago by Dennis McRitchie <dmcr@…>

The 'Attach File' feature is rejecting the patch file as spam because it contains external links. Can I email it to you, or otherwise post it? At 466 lines, it's a bit long to deal with otherwise.

Dennis

Changed 13 years ago by Dennis McRitchie <dmcr@…>

Patch to fix plugin for Trac 0.12.1 (with http replaced by hxxp)

comment:2 Changed 13 years ago by Dennis McRitchie <dmcr@…>

Resubmitted patch having replaced all instances of 'http' in the patch file with 'hxxp' to avoid being rejected by the spam filter.

Be sure to change all instances of 'hxxp' back to 'http' before applying this patch to the r8182 source code.

Dennis

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain astei.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.