I’m attempting to answer the following question in Heap:
How much traffic goes to our various error pages?
- 400 Bad request
- 401 Unauthorized
- 403 Forbidden
- 404 Page not found
- 5xx Server error
Is this possible to answer with Heap? To answer this, would it require that we have specific pages for each error? Is this more of an engineering question?
Thanks in advance for your wisdom fellow Heapsters.
Best answer by dladView original
Thanks for your post, great question. I think you are on the right trail: it depends on the nature of the error page and how it’s displayed. If the error is displayed on pages you control, you can simply load Heap for those pages if there is enough specificity to tell which error it is e.g. www.yoursite.com/404 or something like that.
Otherwise, your engineers should bundle a heap.track() custom event as part of the error handling code. This may be as simple as a one-liner e.g.
your site’s code
your site’s error handling code
They may find this short developer documentation useful! https://developers.heap.io/docs/tracking-field-validation-errors
I hope this helps.