Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3 4 5   Go Down

Author Topic: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x  (Read 148814 times)

0 Members and 1 Guest are viewing this topic.

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333

This plugin adds a tracking code to every page if the user isn't logged in as admin. An additional cookie based exclusion is also available after the installation of this plugin. Users may also opt-out from tracking if they enable Do Not Track from their browser's settings. This plugin replaces my Google Analytics plugin. Please note that some translations are incomplete.

Features:
  • multilingual (currently: en,fi,fr,pl and partly de,nl,ch,es)
  • puts tracker code in all pages except if an admin has logged in or if the user has installed an optional cookie or if the user has enabled Do Not Track
  • doesn't overwrite any core files (eg. anycontent.php or theme.php)
  • theme independent

Supported trackers:
  • Google Anylytics
  • Piwik
  • Open Web Analytics (OWA)
  • BBClone
  • CrawlTrack
  • Yahoo! Web Analytics
  • Bing Webmaster Tools
  • Google Search Console

About the config screen's Extra setting:

This setting is used to give the tracker a second setting. Depending on the tracker, this setting is mandatory for the tracker to work. If completing the field for a specific tracker is necessary, then the field is pre-filled with some text (ID-SITE, for example). Currently this field is only used for site IDs.

Google Analytics users:
Please make sure that you're using the Universal Analytics tracking method from Google Analytics's settings before using this plugin.

Credits:
  • Written by papukaija
  • v. 1.1 has been contributed by André
  • v. 1.4 includes some optimisations by Joachim
  • This plugin includes database and form related code which are taken from the Social bookmark plugin

Translators:
« Last Edit: August 19, 2015, 08:14:52 pm by papukaija »
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #1 on: June 26, 2010, 04:45:44 pm »

A new version of this plugin has been added to the initial post.

Changes in version 2.0:

- Added support for Open Web Analytics (OWA), BBClone and CrawlTrack (please test if they actually work)
- Added explanation for config screen's Extra setting to README.txt
- Updated Google Analytics's tracker code (removed pageTracker._initData(); which is now only usefull with frame sites, see here for more information)
- DB schema: Changed the varchar for tracker_extra to 50


Upgrading from 2.0beta1 (important): Due to the change in db's schema, you must completely uninstall (including settings) this plugin before installing a new version of it. The change was necessary to add support for OWA's longer site IDs.
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #2 on: August 23, 2010, 11:15:44 pm »

A new version of this plugin has been added to the initial post.

Changes in version 2.1:
- Moved README.txt and TODO.txt to /docs/english.html
- Updated few links to use /docs/<user's_lang>.html through greybox
- Changed getRaw to getAlpha in cookie's reading
- This plugin uses now a language fallback
- Added form token to clenup's form
- Added 'success' css class to cookie sender's msg_box() in cookie.php
- inspekt inside external_tracker_footer() is loaded with $strict = FALSE; to use php based trackers but the superglobals are removed at functions's end (@devs: I'll change this method to something else if it isn't safe)
- Fixed redirecting url in cookie.php
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #3 on: September 05, 2010, 01:48:23 pm »

A new version of this plugin has been added to the initial post.

Changes in version 2.2
- Moved from inspekt's $strict = FALSE to _source as the $strict has no effect inside a function (but these superglobals are of course deleted immediately after they're not needed)
Logged

picturevirginia

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 3
    • Picture Virginia
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #4 on: September 06, 2010, 02:10:41 pm »

I'm using the plugin for G analytics. Works great so far, thanks.
Logged

Hache

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #5 on: September 16, 2010, 02:27:42 pm »

Spansih Translation for GA plugin cpg 1.4.xx
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #6 on: September 16, 2010, 06:14:38 pm »

Spansih Translation for GA plugin cpg 1.4.xx
Wrong sub-board and topic ...
Logged

kernelcraft

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #7 on: October 21, 2010, 08:23:43 pm »

Hi.

First of all. Thanks for the nice plugin :)

Do you have source repository available somewhere?
I want to add some Russian tracker and probably Russian translation and it would be simpler to send patches against the source repo...

Thanks.

Alexey
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #8 on: October 21, 2010, 11:29:52 pm »

Do you have source repository available somewhere?
No, a local lamp is enough for me and a dev hasn't yet added this plugin to the official svn.

I want to add some Russian tracker and probably Russian translation and it would be simpler to send patches against the source repo...
Feel free to attach your translations to this topic. It's quite easy to add new trackers to my plugin, so just post the required details to this topic (please use either attachements or the code/quote formatting) and I'll add them to my plugin. The required details for a tracker are url to tracker's doc, default setting value(es) for tracking Id/site IDs, etc and some explanation for those settings. However, I won't have access to main computer until the third week of November, so you'll need to wait a while before your contribution will be included in my plugin.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #9 on: October 22, 2010, 09:26:45 am »

a dev hasn't yet added this plugin to the official svn
Added version 2.2 (package from initial post) to svn repository in revision 7984 (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/external_tracker/).
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #10 on: October 22, 2010, 05:43:11 pm »

Added version 2.2 (package from initial post) to svn repository in revision 7984 (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/external_tracker/).
Great. Thank you.
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #11 on: January 15, 2011, 10:58:25 pm »

A new version of this plugin has been added to the initial post.

Changes in version 2.3:
- Added support for Yahoo! Web Analytics
- Google Analytics and Piwik now use the new asynchronous javascript tracker

You must completely uninstall (including the deletion of settings) the older version due to a database change or alternatively use phpmyadmin to add "async" field to this plugin's table (CPG_plugin_external_tracker where CPG is the prefix set by the gallery's installer) with enum (YES/NO) and 'NOT NULL', NO being the default value and then assign YES for Google Anylytics and Piwik and NO for other trackers.
Logged

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #12 on: January 27, 2011, 03:51:37 pm »

Greetings,
I recently installed another FB mod that had a conflict originally with your external tracker plugin causing its meta data not to show (the FB plugin)
I moved your plugin to a higher position of execution order and it solved the problem.
However, now I'm curious if your plugin is working or not.  I don't see anything in the header for any google scripts, nor do I see any when I have just this plugin installed. 
Is there a way to verify its working outside checking G. Analytics?

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #13 on: January 27, 2011, 08:03:38 pm »

I see the GA script in the header part of your gallery located at http://teknosounds.com/tspics/ (please remember board rules). The plugin doesn't verify the values set in the plugin's configuration (with the exception of security checks by inspekt) , so you can enable any js based tracker with the default values and look at the html source code after you have saved the changes to the settings. Enabling php based trackers with default values may lead to error messages since php's include function will fail.
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #14 on: January 31, 2011, 06:48:55 pm »

Attached v.2.4 of this plugin to the initial post. This version fixes the reported compatibility issue with Image Scroll and other plugins altering the head part of the html code.
Logged

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #15 on: February 01, 2011, 04:39:13 am »

Got an error, tracking it down now:
Code: [Select]
Parse error: syntax error, unexpected T_GLOBAL, expecting '{' in /var/www/html/teknosounds.com/tspics/plugins/external_tracker/codebase.php on line 32

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #16 on: February 01, 2011, 05:08:47 am »

Sure enough the function on line 32 is missing an opening curly brace.  Fixed and working like a charm now.

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #17 on: February 01, 2011, 01:01:37 pm »

Got an error, tracking it down now:
Code: [Select]
Parse error: syntax error, unexpected T_GLOBAL, expecting '{' in /var/www/html/teknosounds.com/tspics/plugins/external_tracker/codebase.php on line 32
Fixed in v.2.5, attached it to initial post.
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #18 on: February 26, 2011, 11:07:21 am »

French translation (by FBleu) added in the pack in the initial post
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
« Reply #19 on: February 26, 2011, 05:28:50 pm »

French translation (by FBleu) added in the pack in the initial post
Thank you for your contribution. Unfortunately the svn version of this plugin is a bit outdated, so I copied the new French files to my local copy and updated the initial package. LP has always the latest version of this plugin, more details in the initial post. I've also added FBleu to the translator part of the docs (both English and French).
Logged
Pages: [1] 2 3 4 5   Go Up
 

Page created in 0.035 seconds with 20 queries.