Why do you show a banner immediately after registering the product in the store and requesting the local storage?
You should first wait for a response from the local storage and check the status of the global variable responsible for advertising, and then decide whether to display the banner or destroy the inap button and not display the banner.
So, if no record is found in the local storage, you can display the banner.