Tweak tracking middleware