Add a callback before the history on SelfService pages