External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

External tracker (Google Analytics, Piwik, etc) for cpg.1.5.x

Started by papukaija, May 30, 2010, 12:01:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

papukaija

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:

papukaija

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.

papukaija

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

papukaija

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)

picturevirginia

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

Hache

Spansih Translation for GA plugin cpg 1.4.xx

papukaija


kernelcraft

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

papukaija

Quote from: kernelcraft on October 21, 2010, 08:23:43 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.

Quote from: kernelcraft on October 21, 2010, 08:23:43 PM
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.

Αndré



papukaija

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.

TeknoSounds

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

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.

papukaija

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.

TeknoSounds

Got an error, tracking it down now:

Parse error: syntax error, unexpected T_GLOBAL, expecting '{' in /var/www/html/teknosounds.com/tspics/plugins/external_tracker/codebase.php on line 32

TeknoSounds

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

papukaija

Quote from: TeknoSounds on February 01, 2011, 04:39:13 AM
Got an error, tracking it down now:

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.

François Keller

French translation (by FBleu) added in the pack in the initial post
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

Quote from: François Keller on February 26, 2011, 11:07:21 AM
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).