What? How? Why? Was that your reaction when you read the title of my blog? Well, as a developer, it is important for us that the code we have written, should not break or should not be blocked by other scripts. Users are very creative these days – if at all tester misses some use cases, users will encounter some of those for sure. So, you need to make sure that your website is working well with every release and every publish of GTM.
And to complement that trigger, it has built-in variables like
- Error Message ( also known as gtm.errorLineNumber dataLayer variable : It will give value which represents the error description in string format
- Error Url ( also known as gtm.errorMessage dataLayer variable ): It will give third party js file URL or any file URL which from which error occurred.
- Error Line ( also known as gtm.errorUrl dataLayer variable ): This is an integer value that shows which line number has caused an error.
GIF: js error tag configuration
- Set alerts if your error rate reaches tocertainlevel. This will enable you tominimisethe risk in case of any important functionality on your website breaks down or gets affected via a third party script.
- Know which third party scripts are causing issues. Fix them. Below screenshot shows which files are causing these errors.
So, start tracking errors on website and get to know the culprits who are affecting your website performance and most importantly, act faster in disaster cases. Feel free to reach out to us in case of any query or leave a comment in the section below.
The following two tabs change content below.
Yaman Patel is a Technical Analyst along with being an enthusiastic Customer Success Manager at Tatvic. He is one of the proud pioneers of Tatvic's dataLayer automation tool(DLAT). He is keen on learning business intelligence technologies.HE loves to travel and explore new places.