Tracking specific impressions


I’m testing Piwik alongside Google Analytics and both are working swimmingly as far as I can tell on my wordpress site with the WP-Piwik plugin installed. The only problem I’m having is that I can’t seem to figure out how to track a specific ad impression. I was able to track the clicks with onclick and they come through fine but I’m completely stumped with how to track an impression event. My code is as follows:

I am not the best at javascript so I’m sure there’s something I’m missing. If anyone can offer any help it would be greatly appreciated as I’m against a strict deadline to find a second tracking solution for our ads.