[Unsupported, outdated]: Google Analytics plugin for cpg1.5.x [Unsupported, outdated]: Google Analytics plugin for cpg1.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

[Unsupported, outdated]: Google Analytics plugin for cpg1.5.x

Started by papukaija, August 16, 2009, 10:48:02 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

papukaija

I have updated my Google Analytics plugin to work with cpg1.5.x. The testing has been done with cpg1.5.2.

Features:
  • multilingual (currently: en, fr, fi, de, nl )
  • puts tracker code in all pages except if an admin has logged in or if the user has installed an optional cookie
  • won't overwrite any core files (eg. anycontent.php or theme.php)
  • theme independent

Feel free to post your translation or comments.

EDIT: This plugin is now replaced by my External tracker plugin. Therefore this plugin becomes unsupported.

Αndré

I've attached version 1.1 to the initial post.

Changes:
- German translation added
- Assigned class 'button' to buttons
- Minor bug fixes

papukaija


papukaija

I've attached version 1.2 to the first post.

Changes:
- Bugfix for a broken html output
- Fixed typo in the Finnish language file
- Αndré, you're now added to the author list of this plugin

tjiepie

I have translation Google Analytics to Dutch

Forum: (I can't post it there, thanks for move)
http://forum.coppermine-gallery.net/index.php/topic,61232.0.html


papukaija

I've attached version 1.3 to the initial post.
Changes:
- Dutch translation added (contibuted by tjiepie)
- Changelog and readme files are added

papukaija

I've attached version 1.4 to the initial post.

Changes:
- Added support for the new plugin installer
- Added svn headers as this plugin has been added to svn
- Added Announcement thread -links to configuration.php

This version is taken from svn, so it includes Joachim's code optimisations in codebase.php. I didn't add the svn headers to the index.html since it is empty and its purpose is to disable diroctory viewing of my plugin.

Ps. Thanks for adding my plugin to svn.

phill104

Thank you for your efforts. Any good script will be added. Coppermine is a community driven project and can only grow with support from users such as yourself. Keep up the good work.
It is a mistake to think you can solve any major problems just with potatoes.

MisteryBrother

Small mistake on line 32:
$extra_info =

Find these code:

$extra_info '<a href="index.php?file=google_analytics/cookie" title="Install or update the cookie">Install or update the cookie</a><br /><a href="http://forum.coppermine-gallery.net/index.php/topic,61232.0.html" rel="external" class="admin_menu external">'.cpg_fetch_icon('announcement', 1).'Announcement thread for '.$name.' plugin</a>';

REPLACE with the code:

$extra_info = '<a href="index.php?file=google_analytics/cookie" title="Install or update the cookie">Install or update the cookie</a><br /><a href="http://forum.coppermine-gallery.net/index.php/topic,61232.0.html" rel="external" class="admin_menu external">'.cpg_fetch_icon('announcement', 1).'Announcement thread for '.$name.' plugin</a>';





papukaija

@MisteryBrother: Thanks for reporting that bug. The fixed version is attached to the initial post.

a-m


jmatute

#11
Hi,

This is the spanish translation. However the plugin information keeps showing in English in Coppermine's plugin admin page - it reads the description field  in the configuration.php file, doesn't it?.

Just in case it changes in the future:
$description='Este plugin añade el código de seguimiento de <a href="http://www.google.com/analytics/" rel="external" class="external">Google Analytics</a>\ a cada página de la galería, salvo al entrar como administrador. También se puede activar la exclusión mediante una cookie tras la instalación del plugin.';
$author='<a href="http://forum.coppermine-gallery.net/index.php?action=profile;u=56739" rel="external" class="external">papukaija</a>, v1.1 por <a href="http://forum.coppermine-gallery.net/index.php?action=profile;u=24278" rel="external" class="external">André</a>';


Regards,

papukaija

Quote from: jmatute on May 04, 2010, 07:21:27 AM
This is the spanish translation. However the plugin information keeps showing in English in Coppermine's plugin admin page - it reads the description field  in the configuration.php file, doesn't it?.
The plugin information is read from configuration.php but that information is static; always in English. I may change this if needed with the coming update of my plugin (see the edit in the initial post).

jmatute

Quote from: jmatute on May 04, 2010, 07:21:27 AM
Hi,

This is the spanish translation.


Sorry, but I can't see attached the file I intended to (spanish.zip). Did I forget it, or got lost when Joachim beautyfied my post ?

Regards,
José Luis

Joachim Müller

I just added the code tags to your posting. I haven't removed an attachment. How could there be translation for a plugin that doesn't feature i18n? As suggested in Geo IP Lookup - check from which country your visitors come from, you're welcome to add i18n for this plugin - that's dead easy, but won't help much, as this plugin doesn't have a config screen or similar - all the end user can do is install it.

jmatute

Spanish file attached. Please forgive my head - I'll try to swicth on 'Memory' config option next time.

Thank you,
José Luis.

jmatute

Hi,

I did some modifications in my personal copy of the plugin, and I don't know if they can be interesting for anybody.

Original plugin had some sentences written in the configuration.php file. I could easily translate them in my but new versions of the plugin will ruin that work. So I put them in the spanish.php and english.php files, and for the rest of languages I provide a default value. It isn't needed when all messages are translated in every language file.

Regards,
José Luis.

papukaija

Quote from: jmatute on May 10, 2010, 06:50:46 AM
So I put them in the spanish.php and english.php files, and for the rest of languages I provide a default value. It isn't needed when all messages are translated in every language file.

Thanks for your effort. My plugin (as Coppermine) has already a language fallback, so there is no need for if ( is_null($description)) function, which can be removed as soon as the needed text is defined in english.php. I won't made those changes to my 1.x version of my plugin because I want to concentrate 100% to the coming v. 2.0 plugin which will add support for other trackers too. However, I will make the configuration.php translateable in my v. 2.0 plugin.

jmatute

Quote from: papukaija on May 10, 2010, 02:43:56 PM
Thanks for your effort. My plugin (as Coppermine) has already a language fallback, so there is no need for if ( is_null($description)) function, which can be removed as soon as the needed text is defined in english.php.

Heard about it, but didn't know it applied here too. I suppose it's my lack of PHP skills.

Quote from: papukaija on May 10, 2010, 02:43:56 PM
I won't made those changes to my 1.x version of my plugin because I want to concentrate 100% to the coming v. 2.0 plugin which will add support for other trackers too.

Very interesting: I had in mind to try to include utm_* and user-defined GA variables specially for postcards sent by coppermine. But it will be in the long term, again because of my lack of  PHP skills. And i'm concentrating on translation - at least I feel I can help that way. Just for curiosity: can you advance which ones are you thinking about?

Quote from: papukaija on May 10, 2010, 02:43:56 PM
However, I will make the configuration.php translateable in my v. 2.0 plugin.
I'll keep aware of it.

Thank you, and regards
José Luis

papukaija

Quote from: jmatute on May 10, 2010, 03:01:44 PM
Heard about it, but didn't know it applied here too. I suppose it's my lack of PHP skills.
Just for curiosity: can you advance which ones are you thinking about?
I'll keep aware of it.

I'm thinking about Piwik and Tynt Insight. Feel free to post more suggestions. I can also look for some GA variables that I could add.