ecommerce tracking – ‘Thank You’ page doesnt show up in every purchase

This is for my client’s website which is built in Magento 2 open source.
Thank You page doesn’t show up during all purchases, which is why all conversions are not tracked properly.

4 out of 5 times, on successful transaction, ccavenue page goes back to brand/cart.html page
It doesnt go to brand/thankyou.html

Any solution for this?

Will buying Thank You extension help?

Also, I want to add script tag code in the thank you page for purchase value tracking, so values are dynamically passed back after a successful transaction. Would anyone know anything on this.

Any help is appreciated.