{"id":133201,"date":"2025-03-14T15:32:52","date_gmt":"2025-03-14T15:32:52","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/gtmtips-track-javascript-errors-as-events\/"},"modified":"2025-03-14T15:32:52","modified_gmt":"2025-03-14T15:32:52","slug":"gtmtips-track-javascript-errors-as-events","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=133201","title":{"rendered":"#GTMTips: Track JavaScript Errors As Events"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>Back back to the friggin\u2019 basics. Almost two years ago, I wrote a two-parter on how to have fun with <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a>: <a href=\"https:\/\/www.simoahava.com\/analytics\/fun-with-google-tag-manager-part-1\/\">Part 1<\/a>, and <a href=\"https:\/\/www.simoahava.com\/analytics\/fun-google-tag-manager-part-2\/\">Part 2<\/a>. The first part had a nice exercise for tracking JavaScript Errors as Google Analytics Events, using the recently published \u201cJavaScript Error Listener\u201d Tag.<\/p>\n<p>Well, that was in GTM V1. Now we\u2019ve been smoothly sailing with the wonderful new interface for well over a year, and it\u2019s time to update some of these nifty tricks. In this <a href=\"https:\/\/www.simoahava.com\/categories\/gtm-tips\/\">#GTMTips<\/a> post, I\u2019ll show you how to track uncaught JavaScript errors in the new interface, plus give you some tips on the overall process.<\/p>\n<p>                <span class=\"simmer\"><br \/>\n  <span class=\"close\">X<\/span><\/p>\n<p>\n    <span class=\"fa fa-md fa-bell\"\/><br \/>\n    <strong>The Simmer Newsletter<\/strong>\n  <\/p>\n<p>\n    Subscribe to the <a href=\"https:\/\/www.simoahava.com\/newsletter\/\">Simmer newsletter<\/a> to get the latest news and content from Simo Ahava into your email inbox!\n  <\/p>\n<p>  <\/span><\/p>\n<h2 id=\"tip-43-track-javascript-errors-as-events\">Tip 43: Track JavaScript Errors As Events<\/h2>\n<div style=\"aspect-ratio: 960 \/ 540;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-tags.jpg\" title=\"Track JavaScript Errors As Events In Google Tag Manager\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"540\" width=\"960\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-tags.jpg#ZgotmplZ\" alt=\"Track JavaScript Errors As Events In Google Tag Manager\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The process is actually really simple. Much easier than it was in the previous Google Tag Manager interface.<\/p>\n<p>By the way, <em>uncaught<\/em> refers to an error which hasn\u2019t been captured and handled by any of the scripts on the page. The most common way to catch an error is to use <code>try...catch<\/code> blocks around your code, which capture any errors which bubble up to the context where you have the block. If an error makes its way through without having been caught in any way, it will trigger the JavaScript Error Trigger. Thus it\u2019s a good way to audit your current error detection methods, too!<\/p>\n<p>Anyway, you start by making sure the Built-In Variables are activated.<\/p>\n<div style=\"aspect-ratio: 1984 \/ 732;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/built-in-errors.jpg\" title=\"Built-In Error Variables\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"732\" width=\"1984\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/built-in-errors.jpg#ZgotmplZ\" alt=\"Built-In Error Variables\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>If you\u2019re curious about these Built-In Variables, check the relevant section of my <a href=\"https:\/\/www.simoahava.com\/analytics\/variable-guide-google-tag-manager\/\">Variable Guide For Google Tag Manager<\/a>.<\/p>\n<p>Next, head on over to <strong>Triggers<\/strong>, and create a new one:<\/p>\n<div style=\"aspect-ratio: 838 \/ 574;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-trigger.jpg\" title=\"JavaScript Error Trigger\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"574\" width=\"838\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-trigger.jpg#ZgotmplZ\" alt=\"JavaScript Error Trigger\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>I\u2019m going to let the Trigger fire on \u201cAll JavaScript Errors\u201d, but be sure to read to the end of this post for tips regarding this selection.<\/p>\n<p>Finally, you need a Google Analytics Event Tag, which collects and concatenates all this information. Here\u2019s what I use:<\/p>\n<div style=\"aspect-ratio: 702 \/ 1052;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/google-analytics-error-tag.jpg\" title=\"Google Analytics Error Tag\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1052\" width=\"702\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/google-analytics-error-tag.jpg#ZgotmplZ\" alt=\"Google Analytics Error Tag\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>An example result using these settings would be something like:<\/p>\n<p><strong>Event Category<\/strong>: JavaScript Error<br \/><strong>Event Action<\/strong>: Uncaught ReferenceError: appear is not defined<br \/><strong>Event Label<\/strong>: 1255: <code>https:\/\/www.simoahava.com\/scripts\/bundle.js<\/code><\/p>\n<p>I\u2019m sending the event as <a href=\"https:\/\/support.google.com\/analytics\/answer\/1033068#NonInteractionEvents\">Non-Interaction: True<\/a>, because it\u2019s not a user interaction, and I don\u2019t want it to be counted as such.<\/p>\n<p>And that\u2019s it for the implementation!<\/p>\n<p>Now, there are some things you might want to consider when implementing this on your own website. The next chapter will tackle these issues.<\/p>\n<h2 id=\"tips\">Tips<\/h2>\n<p>Tracking JavaScript Errors can be quite the bipolar experience. On the one hand, it\u2019s just a good, solid developer attitude to want to know about what\u2019s breaking up or already broken on your site. On the other hand, it can cause a deluge of Events in your Google Analytics profile, leading to sessions reaching their hit limits and severe sampling issues. So here are a couple of tips to manage it all.<\/p>\n<h3 id=\"1-track-errors-as-google-analytics-goals\">1. Track errors as Google Analytics Goals<\/h3>\n<p>\u201cTrack ERRORS as GOALS, what has he been smoking?!\u201d I hear you exclaim. Yeah, it\u2019s not a <em>business<\/em> goal, but goals can also be <strong>negative<\/strong> goals. The reason I\u2019m interested in this particular negative goal, is because I want to see a  <strong>Conversion Rate<\/strong> for sessions with JavaScript Errors. This will allow me to do all sorts of cool analyses on how the error rates are fluctuating over time. To set up the goal, you can use the following settings:<\/p>\n<div style=\"aspect-ratio: 788 \/ 764;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-as-goal.jpg\" title=\"JavaScript Error As GA Goal\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"764\" width=\"788\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-as-goal.jpg#ZgotmplZ\" alt=\"JavaScript Error As GA Goal\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Next, you can create an <strong>Alert<\/strong>, which sends you an email every time the number of JavaScript Errors has gone up significantly on your site:<\/p>\n<div style=\"aspect-ratio: 1528 \/ 740;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-alert.jpg\" title=\"JavaScript Error Google Analytics Alert\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"740\" width=\"1528\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/javascript-error-alert.jpg#ZgotmplZ\" alt=\"JavaScript Error Google Analytics Alert\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Now you\u2019ll get an email every time there\u2019s a significant increase in the number of JavaScript Errors recorded on your site.<\/p>\n<h3 id=\"2-use-environments-or-the-debug-mode\">2. Use Environments or the Debug Mode<\/h3>\n<p>Tracking <em>every single uncaught JavaScript error<\/em> can lead to a deluge of hits. The modern website is best known for the number of errors it dispatches, not the fancy UI or the awesome new framework it utilizes. To keep the number of errors down, you might want to delimit them to only fire in a <a href=\"https:\/\/www.simoahava.com\/analytics\/better-qa-with-google-tag-manager-environments\/\">specific environment<\/a>, or when in the Debug Mode. You could, for example, allow the Error Trigger to work only in the staging environment.<\/p>\n<div style=\"aspect-ratio: 1896 \/ 654;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/error-trigger-environment-debug.jpg\" title=\"JavaScript Error in Environments or Debug Mode\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"654\" width=\"1896\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/error-trigger-environment-debug.jpg#ZgotmplZ\" alt=\"JavaScript Error in Environments or Debug Mode\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>This way only errors triggered by your testers and developers will be recorded. The downside, of course, is that it\u2019s not an authentic setting, and no matter how much you test and debug, you will always miss some things.<\/p>\n<h3 id=\"3-add-manual-sampling\">3. Add manual sampling<\/h3>\n<p>Another way to prevent every single error from dispatching is to manually sample the hits that are sent to Google Analytics. You could, for example, only let the Trigger fire for 50% of recorded errors. You can use the Random Number Built-In Variable here:<\/p>\n<div style=\"aspect-ratio: 1890 \/ 566;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/random-number-sample-javascript-error.jpg\" title=\"Random Number sampling for Error Trigger\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"566\" width=\"1890\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/random-number-sample-javascript-error.jpg#ZgotmplZ\" alt=\"Random Number sampling for Error Trigger\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The trick is to only fire the Trigger when the Random Number Variable returns a number that ends in 0, 1, 2, 3 or 4. That\u2019s 50% of the possible numbers it can end in.<\/p>\n<p>Naturally, the downside here is that you might miss some outlier errors, which only pop up every now and then. But you should still catch most of the significant ones.<\/p>\n<h3 id=\"4-script-error\">4. Script Error<\/h3>\n<p>If your site is using JavaScript files loaded from external content distribution networks, the messages and line numbers of the errors dispatched in these external scripts are not exposed in the browser. This is a reality you\u2019ll have to work with. There\u2019s no way to identify where and what error took place, as the browser will only dispatch the nondescript \u201cScript Error.\u201d message with a line number of 0. The URL of the script is still exposed, though, and you can use that to narrow down the possible errors.<\/p>\n<div style=\"aspect-ratio: 1408 \/ 256;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2016\/03\/script-error.jpg\" title=\"Script Error \"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"256\" width=\"1408\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2016\/03\/script-error.jpg#ZgotmplZ\" alt=\"Script Error \"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>It\u2019s a good idea to host as many scripts as possible on your own website. Not only will you know more about the errors that are thrown, but also being subservient to an external CDN can introduce security issues, if the third party decides to add some malicious or dangerous code to the library you\u2019re using (or if they\u2019re hacked).<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>I hope this tip has been useful. Tracking errors is one of the ways to make sure that your website is catering an optimized experience for your visitors. Google Analytics provides a great tool for tracking these errors, because it also lets you create session- and user-scoped segments around error events. With those segments, you can start analyzing the actual business impact of errors thrown on the site.<\/p>\n<p>An error in the eCommerce checkout funnel can be destructive to your business, and using Google Analytics for detection can help you get on top of things before you\u2019ve lost too much money.<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Back back to the friggin\u2019 basics. Almost two years ago, I wrote a two-parter on how to have fun with Google Tag Manager: Part 1, and Part 2. The first part had a nice exercise for tracking JavaScript Errors as Google Analytics Events, using the recently published \u201cJavaScript Error Listener\u201d Tag. Well, that was in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":133202,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[33494,12573,14492,29091,1018],"dealstore":[],"offerexpiration":[],"class_list":["post-133201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-errors","tag-events","tag-gtmtips","tag-javascript","tag-track"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>#GTMTips: Track JavaScript Errors As Events - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=133201\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"#GTMTips: Track JavaScript Errors As Events - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Back back to the friggin\u2019 basics. Almost two years ago, I wrote a two-parter on how to have fun with Google Tag Manager: Part 1, and Part 2. The first part had a nice exercise for tracking JavaScript Errors as Google Analytics Events, using the recently published \u201cJavaScript Error Listener\u201d Tag. Well, that was in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=133201\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-14T15:32:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=133201#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=133201\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"#GTMTips: Track JavaScript Errors As Events\",\"datePublished\":\"2025-03-14T15:32:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=133201\"},\"wordCount\":1122,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=133201#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg\",\"keywords\":[\"Errors\",\"EVENTS\",\"GTMTips\",\"JavaScript\",\"Track\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=133201#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=133201\",\"url\":\"https:\/\/fivemor.com\/?p=133201\",\"name\":\"#GTMTips: Track JavaScript Errors As Events - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=133201#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=133201#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg\",\"datePublished\":\"2025-03-14T15:32:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=133201#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=133201\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=133201#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=133201#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"#GTMTips: Track JavaScript Errors As Events\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"#GTMTips: Track JavaScript Errors As Events - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=133201","og_locale":"en_US","og_type":"article","og_title":"#GTMTips: Track JavaScript Errors As Events - Som2ny Network","og_description":"Back back to the friggin\u2019 basics. Almost two years ago, I wrote a two-parter on how to have fun with Google Tag Manager: Part 1, and Part 2. The first part had a nice exercise for tracking JavaScript Errors as Google Analytics Events, using the recently published \u201cJavaScript Error Listener\u201d Tag. Well, that was in [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=133201","og_site_name":"Som2ny Network","article_published_time":"2025-03-14T15:32:52+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=133201#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=133201"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"#GTMTips: Track JavaScript Errors As Events","datePublished":"2025-03-14T15:32:52+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=133201"},"wordCount":1122,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=133201#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg","keywords":["Errors","EVENTS","GTMTips","JavaScript","Track"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=133201#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=133201","url":"https:\/\/fivemor.com\/?p=133201","name":"#GTMTips: Track JavaScript Errors As Events - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=133201#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=133201#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg","datePublished":"2025-03-14T15:32:52+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=133201#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=133201"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=133201#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/javascript-error-tags.jpg","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=133201#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"#GTMTips: Track JavaScript Errors As Events"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/133201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133201"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/133201\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/133202"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133201"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=133201"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=133201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}