[Yanel-commits] rev 45351 - public/yanel/trunk/src/webapp/htdocs/Google-Analytics

michi at wyona.com michi at wyona.com
Mon Nov 9 07:55:30 CET 2009


Author: michi
Date: 2009-11-09 07:55:30 +0100 (Mon, 09 Nov 2009)
New Revision: 45351

Modified:
   public/yanel/trunk/src/webapp/htdocs/Google-Analytics/GA.xslt
Log:
note added re overwriting and transform body added

Modified: public/yanel/trunk/src/webapp/htdocs/Google-Analytics/GA.xslt
===================================================================
--- public/yanel/trunk/src/webapp/htdocs/Google-Analytics/GA.xslt	2009-11-09 06:43:05 UTC (rev 45350)
+++ public/yanel/trunk/src/webapp/htdocs/Google-Analytics/GA.xslt	2009-11-09 06:55:30 UTC (rev 45351)
@@ -1,3 +1,5 @@
+<?xml version="1.0"?>
+
 <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:yanel-xsl="http://www.wyona.org/yanel/xsl/1.0"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
@@ -3,9 +5,18 @@
 >
 
+<xsl:import href="../commons/identity-transformation.xsl"/>
+
+<!-- NOTE: Overwrite the GA-key parameter, for example by including this XSLT within another XSLT -->
 <xsl:param name="GA-key" select="'UA-xxxxxx-x'"/>
 
-
 <xsl:variable name="non-asset-URL-suffix" select="'.html'"/>
 
+<xsl:template match="xhtml:body">
+  <xsl:copy>
+    <xsl:apply-templates select="@*"/>
+    <xsl:call-template name="yanel-xsl:insert-GA-code"/>
+    <xsl:apply-templates select="node()"/>
+  </xsl:copy>
+</xsl:template>
 
 <xsl:template name="yanel-xsl:is-asset-URL">



More information about the Yanel-commits mailing list