Hi,
If you entered a URL in the "return URL" setting of your payment methods, then they will redirect the customer to that URL at the end of the checkout, so in that case, you need to add your tracking to that page.
The after_end and end view files are only used as default end pages.
And if you didn't enter a return URL, then adding your tracking code in both after_end and end will definitely add it to the end page. Otherwise, it means that you have some caching or something like that preventing you from seeing the change.