Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • brianh 1 post 21 karma points
    Feb 09, 2011 @ 16:41
    brianh
    0

    custom google event tracking troubles

    hello all,

    essentially i am trying to add event tracking on outbound links on an offer rotator that is built in a xslt file. here is the code i have for the link but when i try to call the data from the document it fails to work. i have set it up where the document type i can add the google code. Any ideas where i am going wrong? I have tried numerous things and it doesnt seem to work. thank you

    nClick="recordOutboundLink(this, 'Outbound Links', 'example.com');return false;

     

    <xsl:text disable-output-escaping="yes">&lt;a href="</xsl:text>
    <xsl:value-of select="umbraco.library:NiceUrl(data[@alias='url'])" />
    <xsl:text disable-output-escaping="yes"> <xsl:value-of select="$currentPage/data [@alias='outBoundtracking']" /> "&gt;</xsl:text>
  • jc 64 posts 101 karma points
    Feb 09, 2011 @ 16:55
    jc
    0

    It's difficult to diagnose without seeing all the pieces, but maybe this will work for you:

    <xsl:element name="a">
        <xsl:attribute name="href">
            <xsl:value-of select="umbraco.library:NiceUrl(data[@alias='url'])" />
        </xsl:attribute>
        <xsl:attribute name="onclick">
            <xsl:value-of select="$currentPage/data [@alias='outBoundtracking']" />
        </xsl:attribute>
    </xsl:element>
  • Kim Andersen 1447 posts 2197 karma points MVP
    Feb 12, 2011 @ 16:21
    Kim Andersen
    0

    Hi Brian

    Are you usign the the legacy XML schema or the "new" one? And are you running through some nodes in a for-each statement? And if so, is the url-property and the outBoundtracking-property located on those nodes?

    And could you tell us what data types are used for the two properties?

    Thanks.

    /Kim A

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies