fix(track): share cookie clearing and setting code