Below is the code for Google Analytics that works for me.
1. There is a newline in the urchin "script" element.
2. The urchin script is in the "head" element so links such as
downloads can be tracked.  The scripts must be loaded before the
links.  HEAD is guaranteed to be before any links.
3. We always specify the UDN because Google Analytics does not seem to
work without it and our servers handle both "example.com" and
"www.example.com".
4. Clear your cache so the homepage is generated after making the
change.  Open the homepage and verify the two pieces of code are on
the page.  Wait 20 minutes, then verify that Google Analytics can see
the code.
5. Google Analytics waits overnight before reporting anything.

HTH,
solprovider

<!-- Lenya Page Builder -->
<xsl:template match="cmsbody">
<html>
<head>
<xsl:call-template name="tracking-scripts"/>
</head>
<body>
<!-- CONTENT -->
<xsl:call-template name="tracking-action"/>
</body>
</html>
</xsl:template>

!-- Google Analytics Scripts -->
<xsl:template name="tracking-scripts">
<script src="http://www.google-analytics.com/urchin.js"; type="text/javascript">
</script>
</xsl:template>

!-- Google Analytics Page Tracker -->
<xsl:template name="tracking-action">
<script type="text/javascript">
_uacct = "UA-1234567-1";
_udn="example.com";
urchinTracker();
</script>
</xsl:template>


On 9/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I've set up a Google Analytics account ( http://www.google.com/analytics )
> and added the tracking code just before the </body> tag in page2xhtml.xsl
> . For some reason, Analytics is not detecting the tracking code. The only
> thing I have noticed is that Lenya converts the first script element into
> an empty element.
>
> Has anyone else had this problem and / or know of a workround?
> James

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to