Reinstate the analytics diagnostic logging

@commuterjoy