I recently looked for a way to integrate the Google Analytics tracking code into the project site of my current spare time project Criteria4JPA. I'm using the Maven Site Plugin to automatically build the project page because it makes the process of creating a site very easy.
But after much more searching I discovered a very simple and elegant way to get the Google Analytics tracking code into the maven site. I found the hint on the doxia-dev mailing list. Someone talked about a mysterious <head> element that can be used in the site.xml descriptor. The JIRA issue DOXIA-150 seemed to prove the existence of this feature.
I tried it and it worked. See the site.xml file of Criteria4JPA for an example:
I don't know for sure which versions of Maven, Doxia and the Site Plugin are required for this but I can confirm that Maven 2.2.0 together with the Maven Site Plugin 2.0-beta-7 works.
Happy tracking... :-)