Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 29, 2013 01:37 PM by NovaScotia82
Jan 29, 2013 01:37 PM|LINK
Hi, I'm working on the following XSLT-file in Umbraco. What I want to achieve is to implement the Google Event Tracking code into an attribute. But, I don't know how this works exactly. What the Event Tracking does, is creating an 'onClick' feature, which
enables me to track the click on a to be downloaded document in Google Analytics.
This is the code I want the Event Tracking placed in:
<xsl:when test="directbuttontekst= ''">
And this is the code I'd like to add, but don't know how.
onClick="_gaq.push(['_trackEvent', '<xsl:value-of select: Action Category>', '<xsl:value-of select: Action Type>', '<xsl:value-of select: Action Label>']);"
Is this possible, and if yes, do you have a suggestion on how to implement it in the <a> attributes?