Bryce,

 

I think this will work.

 

You could add the google analytics code in the  <xsl:template
match="site"/> of the common skin file 'site-to-xhtml.xsl' in the
directory 'main\webapp\skins\common\xslt\html' with a variable for the
tracking site ID  hat will come from the skinconfig.xml file.  Then put
your tracking site ID in the skinconfig.xml file on some new created
element and modify the 'skinconf.xsl' in the directory
'main\webapp\skins\common' to make sure that you handle defaults
properly.

 

Steve

 

 

From: Bryce Alcock [mailto:u912boilerma...@gmail.com] 
Sent: Monday, September 20, 2010 3:01 PM
To: user@forrest.apache.org
Subject: Tracking Codes and Java Script

 

 

I was wondering if there was a simple and systematic way to configure a
tracking code into Forrest, for every page.

 

So for a concrete example I would like to add a 

Google Analytics tracking code to the bottom of each page.

 

Currently I am having to do this by modifying files in the Forrest
directories.

(This works file with the exception that I have 2 forrest project and I
have to keep remembering to change these files...)

 

I would like to just be able to specify a tracking code and style or
possibly an html/javascript segment, 

in a Config file such as site.xml or something like that.

 

 

Bryce