OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: DocBook Google Analytics


If you use Google Analytics and want to add tracking to your html
pages generated by DocBook, try adding this to your customization
layer:

<xsl:template name="user.footer.content">
  <script src="http://www.google-analytics.com/urchin.js";
type="text/javascript"></script>
  <script type="text/javascript">
_uacct = "xx-xxxxxx-x";
urchinTracker();
  </script>
</xsl:template>

Replace "xx-xxxxxx-x" with your Analytics user id.

If you are making chunked output, change "user.footer.content" to
"user.footer.navigation".

If you are making xhtml output, you will need to set the default
namespace in the stylesheet that contains the above template, like so:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
                xmlns="http://www.w3.org/1999/xhtml";>

References:
http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#HeaderExtras
http://www.oasis-open.org/archives/docbook-apps/200603/msg00213.html

Regards,
-- 
http://chris.chiasson.name/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]