VID-1786 Implemented tracking for galleries and slideshows

Understand JS so much better now ...