persist trace code between page refreshes