Skip to content

Tag: coding

Event tracking with JavaScript

A while back Google added event tracking to Analytics so you could keep track of Javascript and Flash events.  Pretty cool feature.

Being the stat junkie that I wanted to use this to keep track of outgoing clicks on a photography forum of mine.  But I didn’t want to have to go through every link prior to displaying the page.  Seemed like a perfect time for a little bit of Javascript. 

JavaScript Error ‘expected identifier, string or number’ in IE

Sometimes you get those errors that just pick at you and you can’t seem to find a solution. It happened to me this morning when testing and reviewing a JavaScript library I’m writing in IE7. FireFox worked without a hitch, but IE threw an ‘expected identifier, string or number’ error pointing to the last line of the variable declaration. Of course it didn’t help that my copy of MS Script Debugger wanted to lock up my computer.

Here’s a very shortened example of the code I was working on.