How to track 404 erros in Google Ananlytics which are getting from published advertise on website
We have a news publication website where the advertisement are getting published either through Google or through our Ad hosted server. I would like to know, if any user is getting 404 or 500 error page after clicking the Advertisement URL/Icon?
How can we record those errors/instances in Google Analytics. We are using GA for the analytics of this website.