Store target and key in local storage.