VID-1786 Implemented tracking for galleries and slideshows

Understand JS so much better now ...
Not really I suppose!