Funny. I went with that approach first, and then changed, thinking this way would be more convenient to use, especially if we build more AJAX-based pages in the future. Having to verify whether that function exists or not every time we use it seems bad to me. I'm more inclined to have something that always exists, but does nothing if there is no configured tracker. Better abstraction I think. 

If you do not agree, I don't mind reverting to what you show.