Google Analytics

bic Member, Translator
Hi all, I've been away for a while but of course I'm still using Zenphoto and customizing it for my needs sometimes.
Recently I've added google analytics to my theme. I noticed that an old third party plugin is no longer maintained nor hosted by the original creators. Since it's quite easy to make a new plugin for this purpose, I was wandering if you are interested in it. If so, I can provide it quite soon. My only concern is that at the moment I didn't find an easy way to place analytics code just before the closing `` tag, as recommended in google guidelines for analytics, since `theme_head` filter is not placed there in all themes. I don't know exactly if this can be a major problem. BTW, of course in my theme I have placed the code where google asks it to be.

Comments

  • acrylian Administrator, Developer
    Indeed the theme_head filter is best placed as the last item on the ``. The simple reason is that otherwise a theme overrides custom css of plugins. (Something we meant to do on the offical themes actually).

    Besides that I am sure GA will work regardless as it is just a recommendation. Many recommend to place JS generally before the body element because of saving delay caused by scripts loaded.

    It is still listed on one of the authors site's: http://www.moto-treks.com/download/viewcategory/6-software but I have no idea if that is the last version (I mean to remember that micheall took it over from there but his site is dead for whatever reasons.

    So feel in any case feel free to take over the plugin. We update the entry then accordingly once you let us know.
  • bic Member, Translator
    I see, I didn't find the link in its page here:
    http://www.zenphoto.org/news/google-analytics

    Than may be it's better to contact micheall before, to ask him if he wants still to provide the plugin. It has the smart option to disable analytics for admins, but the script is loaded at the bottom of the page, before body close, that may leed to loose some visitors statistics, and is probably not very effective on page load speed, since it's asynchronous by default. Correct me if I'm wrong on this point.
  • acrylian Administrator, Developer
    You find the site if you visit the author's page, j916 in this case. Micheall was not active on the forum for some time and his site is down. If you find any way to contact micheall feel free…

    Regarding the loading except here on Zp.org I personally don't use Google Analytics so I did not really investigate anything about it (actually my browsers are blocking it as well). It has to load some JS stuff from Google so that can slow down page loading as many external scripts tend to do.

    But since you are using it you might indeed know better so I leave that to you :-) On Zp we generally load js stuff in the head actually and so far I never noticed any real slowdown on that.
  • bic Member, Translator
    micheall site is still offline, I've contacted the admin of the site hosting the old plugin.
  • Hi

    I've taken over Jeff's plugin over a long time ago, and only updated it recently... still struggling with the new Universal Analytics interface.

    I've made a first alpha version available here http://blog.zepsikopat.net/2014/04/24/zenphoto-analytics-plugin-4-0/ . Feel free to report any bugs.
  • acrylian Administrator, Developer
    Ok, great. micheall's site ist back meanwhile but he has this not listed anymore. I will update respectively create a new extensions entry soon.
  • acrylian Administrator, Developer
    @ZEPsikopat: The entry has been updated with your link:
    http://www.zenphoto.org/news/google-analytics
    It would be great if you could have a fixed link (own category maybe) for the plugin as it otherwise outdates right on the next update.

    I see you are running the now abandoned by its developer zpSkeleton theme. It should throw quite some errors and warnings with the 1.4.6 beta. Did you update it already for 1.4.6 maybe? Or just ignoring them? :-) Otherwise e would appreciate contribution of that update to our unsupported repository: https://github.com/zenphoto/unsupported
  • @acrylian: I haven't finished checking all the potential issuesof the theme yet, but I can commit on git once I've gone through all of them.

    Same about the google analytics plug-in, I'll provide a git repository or at least a decent page for it once I consider it as stable.
  • acrylian Administrator, Developer
    Ok, sounds good.
Sign In or Register to comment.