[Yanel-dev] Google analytics onclick

Michael Wechner michael.wechner at wyona.com
Mon Nov 8 16:01:57 CET 2010


On 11/8/10 3:10 PM, Michael Wechner wrote:
> Hi
>
> I have justed noticed that links like
>
> <a href="http://foo.bar/hello-world.php">Hello PHP</a>
>
> are also "matched" as assets by
>
> src/webapp/htdocs/Google-Analytics/GA.xslt
>
> and hence an onclick will be added by this script, whereas this 
> doesn't really make sense.
>
> I have added .php as an exception
>
> Sending        src/webapp/htdocs/Google-Analytics/GA.xslt
> Transmitting file data .
> Committed revision 54504.
>
> but we should improve this differently in the long run.

also there seems to be a bug re TinyMCE and namespaces when aggregating 
content and hence I have done the following change:

svn diff src/webapp/htdocs/Google-Analytics/GA.xslt
Index: src/webapp/htdocs/Google-Analytics/GA.xslt
===================================================================
--- src/webapp/htdocs/Google-Analytics/GA.xslt    (revision 54504)
+++ src/webapp/htdocs/Google-Analytics/GA.xslt    (working copy)
@@ -62,7 +62,10 @@


<!-- INFO: Add onclick if URL corresponds to an asset -->
+<xsl:template match="*[local-name()='a']">
+<!-- TODO: It seems that all links inserted with TinyMCE are loosing 
their namespace and hence the below does not match
<xsl:template match="xhtml:a">
+-->
<xsl:param name="URL" select="@href"/>

<!-- DEBUG: Output URL suffix

Sending        src/webapp/htdocs/Google-Analytics/GA.xslt
Transmitting file data .
Committed revision 54506.

whereas maybe we should be more strict about this and the above rule is 
too fault tolerant.

WDYT?

Cheers

Michael
>
> Cheers
>
> Michael



More information about the Yanel-development mailing list