.addListener() Usage

Dear All,

How exactly does “.addListener” work, or what’s the proper usage?

I’m trying to track clicks on a lightbox script (which Ajax-es the next picture) as pageviews, and I set up a class to track the click as class=galerie and added piwikTracker.addListener(".galerie"); and then .addListener("galerie") to the piwik javascript tag, but neither register the clicks.

What’s the proper syntax for addListener()?


addListener(element) where element is a DOM element, e.g., element = getElementById(‘myElementId’);