Hi @ishank_tewari ,
It sounds like you may want to add/interact with some development logic on the page to make it clear when a page load corresponds to the actual transaction.
As an example, there may be logic on the previous page which determines whether a transaction is successful and routes users to the new page. Using the logic of a successful payment on the previous page, one solution would be to temporarily set a flag in the client's local storage which is read and removed on the successful payment page. Then on a refresh, it would no longer find the flag in local storage and wouldn't set the custom event.
Actually, the solution on your duplicate post, here, seems sufficient as long as there aren't any other custom events being set at the same time.
This question may be more appropriate to ask in the Launch sub forum.
All the best,
J