Archive for category google analytics
Adding Google Analytics Code to a phpLD installation
Posted by admin in google analytics, phpLD on November 29th, 2008
Here’s a quick post to help you add Google Analytics tracking code to your phpLD (php link directory) template. Because phpLD uses the Smarty templating system, simply opening the footer.tpl and placing the Analytics code before the closing body tag will result in an error. You need to tell Smarty not to parse the code between the script tags. To do so, open your templates/footer.tpl file, and right before the closing body tag, place your Google code like this:
{literal} Your-Analytics-Code-Here{/literal}
Now save and put. That’s it!
Adding Google Analytics to an ELGG installation
Posted by admin in elgg, google analytics on August 28th, 2008
This is more of a rant than a tutorial, so forgive me if you are searching a solution and this doesn’t help you.
As far as open source web applications go, Elgg is pretty difficult to work with. It’s buggy, there are a lot of compatibility problems, and support from the development team and the community is less than stellar. The application is, however, very powerful, and has many functions that make it the best choice, in my opinion, for an open source social networking web application.
After some difficulty, I got my installation at http://www.fanclubhelper.com up and running. Being afraid to touch it again, for fear I’d open up a can of worms, I didn’t make any modifications for over a year. In that time, however, the site started ranking well in some searches I’m interested in, and it was now time to install Google Analytics, to see how the traffic was doing.
In most open source software applications I’ve used, in order to make changes, such as adding Google Analytics tracking code, you edit the template file. So I went to /mod/template/templates/MyTemplate/pageshell and pasted the Google Analytics code before the closing body tag. In checking the live site, however, the code was not installed.
Since the closing body tag needs to be coming from somewhere, I took a shot in the dark and added the Google Analytics code to the pageshell file of the default template. That worked, but I have no idea why. It also had the side-effect of putting some text over my logo where it wasn’t before. I can only guess that one of the pageshell templates I put was different on the server than my local copy, and I forgot about it during the year of inactivity. Another ELGG mystery that I’d rather not get into. It’s working well enough, so no touchy!!



Recent Comments