Google Analytics plugin for cpg1.4.x Google Analytics plugin for cpg1.4.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

Google Analytics plugin for cpg1.4.x

Started by papukaija, June 23, 2009, 11:11:19 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

papukaija

This plugin adds Google Analytics's tracking code to every page if you aren't logged in as admin. An additional cookie based exclusion is also available after the installation of this plugin. I won't include an IP based exclusion as it's available in Google Analytics's settings. This plugin won't overwrite any core files (eg. anycontent.php or theme.php) and it is theme independent.

This plugin is currently available in English, French, Spanish and in Finnish. Feel free to post your translation.

Installing this plugin should be straightforward. Use plugin manager to install the plugin and when requested, give your GA tracker ID (UA-123...) to the installer.

Note for existing users of Coppermine: Please remember to clean up your template.html, master_template plugin or anycontent.php from Google Analytics code before installing this plugin.

Feedback is appreciated (this is my first plugin).


[Edit GauGau 2010-03-03]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/google_analytics

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_google-analytics_v1.3.zip/download[Edit papukaija 2010-09-17]newer version attached to this post[/Edit]
[/Edit]

phill104

Thank you for your willingness to share your work. I currently do not have a Google account but as soon as I get time to set one up I will give this plugin a go. If it does what it says on the tin I am sure it will be very popular.
It is a mistake to think you can solve any major problems just with potatoes.

Fabricio Ferrero

Don't get me wrong with your contribution, is so welcomed but, Does this plugin overwrite the anycontent.php content? In that case, I thinks this plugin will give more trouble than solutions.

Remember that the step to include Analytics code in a CPG you just have to open template.html and paste the code. There is no need to make it easier than that. You can also place the code with the footer or header feature.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

papukaija

Quote from: Fabricio Ferrero on June 23, 2009, 11:40:45 PM
Don't get me wrong with your contribution, is so welcomed but, Does this plugin overwrite the anycontent.php content? In that case, I thinks this plugin will give more trouble than solutions.
This plugin doesn't overwrite your anycontent.php or any other file. It uses a database to retrieve your Anylytics's tracker ID. After that, the plugin will use php to check if you have a cookie to exlude yourself from the Anylytics's stats. If there is no cookie, it will check if you are logged in as admin (again to exlude you from the stats), otherwise it will print the javascript to get statistics to Google Anylytics's.

Quote from: Fabricio Ferrero on June 23, 2009, 11:40:45 PM
Remember that the step to include Analytics code in a CPG you just have to open template.html and paste the code. There is no need to make it easier than that. You can also place the code with the footer or header feature.
New users of Coppermine may find easier to install this plugin than editing a template.html. Also template.html is theme specific. If you do not use the master_template plugin, you have to edit every theme's template.html that is uploaded to your server to get statistics from your visitors.

Fabricio Ferrero

Where are the following posting of this thread? I'm sure that there was more replies to this post.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

phill104

They vanished when we were hacked unfortunately. If you have a rough idea of what was said feel free to add it.
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

Quote from: Fabricio Ferrero on June 29, 2009, 07:24:23 PM
Where are the following posting of this thread? I'm sure that there was more replies to this post.
See Website down time

Fabricio Ferrero

Quote from: Phill Luckhurst on June 29, 2009, 07:31:09 PM
They vanished when we were hacked unfortunately. If you have a rough idea of what was said feel free to add it.
Quote from: Joachim Müller on June 29, 2009, 08:05:58 PM
See Website down time
Of course I'm aware of this, but I don't think the post was made in that time period. I'm sure that the reply was made by you Joachim and was not removed by the hacking issue.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Joachim Müller

It was. The posting I initially made falls exactly into the period that got lost. The promotion of papukaija's account to contributor level and the moving of this thread into the contributions board falls into the same period - both things have been undone by the restoring of the database. However, I don't find this meta-discussion helpfull on this thread. The thread author and the plugin deserves better than that. So please let's stop the meta discussion about the loss of postings - while it's sad that they got lost, the discussion about the reasons should be lead elsewhere (if at all). Let's get back to this thread: the Google analytics plugin that papukaija contributed.

TeraS

I attempted to activate this plugin in my gallery and received this error message:

Fatal error: require() [function.require]: Failed opening required 'plugins/analytics/include/init.inc.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /gallery/plugins/google_analytics/codebase.php on line 52

I am running Coppermine 1.4.25 with the lipstik theme and my gallery is at: succubus.net/gallery/index.php


Thank you for any help!


Tera

Nibbler

Quote from: papukaija on June 23, 2009, 11:11:19 PM
EDIT: Due to the downtime, the working version of my plugin has disappeared from this forum. I will upload it when I will be back from my holidays (in August). In the meanwhlile you can rename the folder inside the zip to "analytics".

Do as suggested and it should work.

TeraS

I can't believe I missed that...

Sorry and thank you!


Tera

papukaija

I've attached version 1.2 to the initial post. This version adds support for the new plugin installer in cpg 1.4.26

Joachim Müller

cpg1.4.26 doesn't contain new features in comparison to previous versions of cpg1.4.x, so I don't get what you're refering to.

papukaija

I'm referring to this.
QuoteAdditionally, cpg1.4.26 includes fixes for the following non-security related issues:
    * Added check to plugin manager for version requirements - backported feature from cpg1.5.x

Hache

hi all, i find  this plugin and i have a few questions...i dont udenrstand how its work...i read the explanation but i dont really finish to know how works really...

I have edited my theme and template.html a lot....to modify with others stuffs, do i need put something back in code?

thank you guys!

Im using cgp 1.4.27



papukaija


Hache

i have in my computer...running like a server...how do i link ?


papukaija

Quote from: Hache on September 16, 2010, 01:50:59 PM
i have in my computer...running like a server...how do i link ?
Sorry, there is no support for self-hosting issues on this forum. (The link points to cpg1.5.x's docs but it has the same information about it, that doc just has better links for forum use than cpg1.4.x's links).

Quote from: Hache on September 16, 2010, 01:10:28 PM
I have edited my theme and template.html a lot....to modify with others stuffs, do i need put something back in code?
This plugin doesn't require any modifications to any theme.

Quote from: Hache on September 16, 2010, 01:10:28 PM
i dont udenrstand how its work...
Here you go:
Quote from: papukaija on June 24, 2009, 12:21:42 PM
This plugin doesn't overwrite your anycontent.php or any other file. It uses a database to retrieve your Anylytics's tracker ID. After that, the plugin will use php to check if you have a cookie to exlude yourself from the Anylytics's stats. If there is no cookie, it will check if you are logged in as admin (again to exlude you from the stats), otherwise it will print the javascript to get statistics to Google Anylytics's.
New users of Coppermine may find easier to install this plugin than editing a template.html. Also template.html is theme specific. If you do not use the master_template plugin, you have to edit every theme's template.html that is uploaded to your server to get statistics from your visitors.

I've updated the initial post to include install instructions.

Quote from: Hache on September 16, 2010, 02:12:01 PM
http://190.227.116.135/webdav/index.php
i guess its that
This plugin is working on that site...