Wednesday 15 September 2010

HTML valid way of tracking outbound links via Google Analytics? -


I'm using, and I'm tracking an outbound link, but I want my page to be valid .

This is the error that I am getting: There is no "ononic" attribute

HTML:

   

I have added this to my JavaScript embed file to track all outgoing links:

  $ (document) .ready (function () { $ ('A href = = http: no ("[href * =: //' + document.domain + ']"). Click (function () {pageTracker._trackPageview (' / out / '+ $ (This) .attr ("href"));});});  

So now my js embed file looks like this, I notice that I get $ (document) I call .ready (function) {At the beginning of both snippets, will they both go into one?

  $ (document) .ready (Function () {// opens a link in a separate window $ ('a [relay = "external"]'.) (Function () {window.open ($ (this) .attr ('href')) ; Return false;});}); $ (document) .ready (function () {$ ('a [href ^ = http]: no ("[href * =: //' + document.domain + '] ") '.) Click (function () {pageTracker._trackPageview (' / out / '+ $ (this) .attr (" href "));})}};  
< / Div>

Unless you are using some highly vague or ancient versions of HTML, you are probably using xhtml , Which is mamu Lee is sensitive and all low-case. It's called onclic .


1 comment: