April 2010 Archives

Custom global markup portlet

| No Comments | No TrackBacks

What would you do if a customer demands to "integrate" his Liferay based corporate portal with Google Analytics, Geminus, ClickTale, Crazy Egg,  and whole bunch of other analytics tools available out there?

As you probably know, such services typically provide some piece of javascript (code or file) which needs to be added to every page of monitored web site. Each service also provides unique customer code/key (which is either already part of the javascript provided or needs to be placed in specific place). Regardless of whether using all of them at the same time is a smart thing to do, there are a few technical problems to solve:

  • How to add custom code to every portal page
  • How to deal with unique codes/keys through development, testing, staging, production phases
  • How to minimize the impact of changing/removing custom code in production environment