{"id":12718,"date":"2018-01-10T00:00:00","date_gmt":"2018-01-10T00:00:00","guid":{"rendered":"https:\/\/e-dialog.group\/blog\/javascript-error-logging-with-the-google-tag-manager\/"},"modified":"2026-02-26T13:38:01","modified_gmt":"2026-02-26T13:38:01","slug":"javascript-error-logging-with-the-google-tag-manager","status":"publish","type":"post","link":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/","title":{"rendered":"Javascript Error Logging With The Google Tag Manager"},"content":{"rendered":"<h2>Why do these errors occur and how can you prevent them?<\/h2>\n<p>The most common reason is a lack of testing. Errors often occur when the code is in a<strong>custom HTML tag<\/strong>has not been tested in all common browsers, there are sub-pages on the website that are based on a different technology and this has not been taken into account or the website is being adapted by IT and the code in the GTM no longer works as originally intended.<\/p>\n<p><img decoding=\"async\" width=\"800\" height=\"531\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild1.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild1.png 839w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild1-300x199.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild1-768x510.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><\/p>\n<h2>Two solution variants to prevent JavaScript errors &ndash; we&rsquo;ll show you how it&rsquo;s done!<\/h2>\n<h3>First option &ndash; Google Tag Manager Trigger<\/h3>\n<p>The GTM itself provides a &ldquo;JavaScript error trigger&rdquo;. This reports errors if:<\/p>\n<ol>\n<li>\n<ol>\n<li>\n<ul>\n<li>the error is not caught by try\/catch, and<\/li>\n<li>the GTM is finished loading.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>Of course, the GTM does not register any action that happened beforehand &ndash; see explanation in the screenshot below!<br>1) although the page shows two errors in the console<br>2) the GTM only triggers in the event of an error<br>3) The error message of the registered error can then be sent to Google Analytics using an event<\/p>\n<p><img decoding=\"async\" width=\"800\" height=\"355\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil1-1024x455.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil1-1024x455.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil1-300x133.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil1-768x342.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil1.png 1286w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><img decoding=\"async\" width=\"627\" height=\"572\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil2.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil2.png 627w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild2neu-teil2-300x274.png 300w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\"><\/p>\n<p>If you want to measure all errors (both those caused by the page and those caused by the GTM) and accept that some of them will not be caught, that is the way to go.<\/p>\n<p>To do this, first create a trigger with the type &ldquo;<strong>JavaScript error<\/strong>&rdquo; created. As always, there is also the option of not triggering errors on all of them, but only on certain pages, for example.<\/p>\n<p><img decoding=\"async\" width=\"800\" height=\"275\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild3.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild3.png 837w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild3-300x103.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild3-768x264.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><\/p>\n<p>The previously created trigger then only needs one<strong>Google Analytics event tag<\/strong>be assigned. Ideally, the {{Error Message}} and the<br>{{Error Line}} passed on to Google Analytics. These two variables are<strong>integrated GTM variables<\/strong>and must first be activated under the Variables menu item.<\/p>\n<p><img decoding=\"async\" width=\"800\" height=\"615\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild4.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild4.png 836w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild4-300x231.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild4-768x591.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><img decoding=\"async\" width=\"556\" height=\"714\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild5.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild5.png 556w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild5-234x300.png 234w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\"><\/p>\n<h3>Second option &ndash; own trigger<\/h3>\n<p>However, you would like to<strong>only track the GTM errors<\/strong>In order to be able to adapt your code in the custom HTML tag, the following procedure is recommended:<\/p>\n<p>You secure your code using a try\/catch block and in the event of an error (in the example the myError function) the error message is sent to Google Analytics.<\/p>\n<p><img decoding=\"async\" width=\"403\" height=\"383\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild6-1.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild6-1.png 403w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild6-1-300x285.png 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\"><\/p>\n<p>As usual you can do it in the<strong>dataLayer<\/strong>pushed information with one<strong>Google Analytics Event Tag<\/strong>pick up and send.<br>As<strong>Trigger type<\/strong>a custom event must be selected.<\/p>\n<p><img decoding=\"async\" width=\"800\" height=\"648\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild7.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild7.png 841w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild7-300x243.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild7-768x622.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><img decoding=\"async\" width=\"800\" height=\"295\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild8-1.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild8-1.png 834w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild8-1-300x111.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild8-1-768x284.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><\/p>\n<p>Then in Google Analytics you can filter on the events with the category &ldquo;GTM&rdquo; and both &ldquo;<strong>Event label<\/strong>&rdquo; as well as &ldquo;<strong>Page<\/strong>&rdquo; can be displayed as a secondary dimension. Here you can see which error occurs where and if necessary, improvements can be made.<\/p>\n<p><img decoding=\"async\" width=\"800\" height=\"292\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild9neu-1024x374.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild9neu-1024x374.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild9neu-300x110.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild9neu-768x280.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild9neu.png 1164w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><\/p>\n<p>Optionally, based on this event in Google Analytics<strong>custom notification<\/strong>be created. This will automatically notify you if errors occur.<\/p>\n<p><img decoding=\"async\" width=\"800\" height=\"303\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild10neu-1024x388.png\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild10neu-1024x388.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild10neu-300x114.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild10neu-768x291.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bild10neu.png 1181w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\"><\/p>\n<h3>Do you need help configuring your tag manager?<br>\nWrite to us via<a href=\"mailto:kontakt@e-dialog.group\">kontakt@e-dialog.group<\/a><\/h3>\n","protected":false},"excerpt":{"rendered":"<p>If the Google Tag Manager (GTM) is installed on a website, JavaScript errors can be caused both by the page itself and by the GTM.<\/p>\n<p>For online marketers who work with the GTM, it is particularly important to avoid possible errors caused by the GTM.\u00a0 In online shops, such errors can, in the worst case scenario, occur during the checkout process and thus prevent customers from completing their order. Of course, other types of disruptions are also possible: newsletter registration no longer works, links no longer forward, and many more.<\/p>\n","protected":false},"author":1,"featured_media":4804,"comment_status":"closed","ping_status":"open","sticky":false,"template":"post-old.php","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5,445],"channel":[],"goal":[463],"technology":[38],"c-year":[64],"class_list":{"0":"post-12718","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-analytics","9":"goal-digital-strategy","10":"technology-google-tag-manager","11":"c-year-64"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Javascript Error Logging With The Google Tag Manager - e-dialog<\/title>\n<meta name=\"description\" content=\"If the Google Tag Manager (GTM) is installed on a website, JavaScript errors can be caused both by the page itself and by the GTM. For online marketers who work with the GTM, it is particularly important to avoid possible errors caused by the GTM.\u00a0 In online shops, such errors can, in the worst case scenario, occur during the checkout process and thus prevent customers from completing their order. Of course, other types of disruptions are also possible: newsletter registration no longer works, links no longer forward, and many more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Javascript Error Logging With The Google Tag Manager\" \/>\n<meta property=\"og:description\" content=\"If the Google Tag Manager (GTM) is installed on a website, JavaScript errors can be caused both by the page itself and by the GTM. For online marketers who work with the GTM, it is particularly important to avoid possible errors caused by the GTM.\u00a0 In online shops, such errors can, in the worst case scenario, occur during the checkout process and thus prevent customers from completing their order. Of course, other types of disruptions are also possible: newsletter registration no longer works, links no longer forward, and many more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"e-dialog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/edialog.group\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-10T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T13:38:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2200\" \/>\n\t<meta property=\"og:image:height\" content=\"1180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"digitalists\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"digitalists\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/\"},\"author\":{\"name\":\"digitalists\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/person\\\/7b481e2ac90c21e4dc393821d35bb518\"},\"headline\":\"Javascript Error Logging With The Google Tag Manager\",\"datePublished\":\"2018-01-10T00:00:00+00:00\",\"dateModified\":\"2026-02-26T13:38:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/\"},\"wordCount\":462,\"publisher\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"articleSection\":[\"Analytics\",\"Analytics\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/\",\"name\":\"Javascript Error Logging With The Google Tag Manager - e-dialog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"datePublished\":\"2018-01-10T00:00:00+00:00\",\"dateModified\":\"2026-02-26T13:38:01+00:00\",\"description\":\"If the Google Tag Manager (GTM) is installed on a website, JavaScript errors can be caused both by the page itself and by the GTM. For online marketers who work with the GTM, it is particularly important to avoid possible errors caused by the GTM.\u00a0 In online shops, such errors can, in the worst case scenario, occur during the checkout process and thus prevent customers from completing their order. Of course, other types of disruptions are also possible: newsletter registration no longer works, links no longer forward, and many more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/#primaryimage\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"contentUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"width\":2200,\"height\":1180,\"caption\":\"|\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/javascript-error-logging-with-the-google-tag-manager\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Javascript Error Logging With The Google Tag Manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/\",\"name\":\"e-dialog\",\"description\":\"Data-driven Marketing &amp; Strategie\",\"publisher\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#organization\",\"name\":\"e-dialog\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/e-dialog-logo.svg\",\"contentUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/e-dialog-logo.svg\",\"width\":1,\"height\":1,\"caption\":\"e-dialog\"},\"image\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/edialog.group\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/e-dialog-gmbh\\\/\",\"https:\\\/\\\/www.instagram.com\\\/e_dialog\\\/\",\"https:\\\/\\\/www.tiktok.com\\\/@e_dialog\"],\"description\":\"Bei e-dialog gestalteten wir gemeinsam die Zukunft des data-driven Marketings - mit einem gro\u00dfartigen Team aus passionierten Expert*innen.\",\"email\":\"kontakt@e-dialog.group\",\"telephone\":\"+43 1 309 09 09\",\"legalName\":\"e-dialog GmbH\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/person\\\/7b481e2ac90c21e4dc393821d35bb518\",\"name\":\"digitalists\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g\",\"caption\":\"digitalists\"},\"sameAs\":[\"https:\\\/\\\/e-dialog.group\"],\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/author\\\/digitalists\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Javascript Error Logging With The Google Tag Manager - e-dialog","description":"If the Google Tag Manager (GTM) is installed on a website, JavaScript errors can be caused both by the page itself and by the GTM. For online marketers who work with the GTM, it is particularly important to avoid possible errors caused by the GTM.\u00a0 In online shops, such errors can, in the worst case scenario, occur during the checkout process and thus prevent customers from completing their order. Of course, other types of disruptions are also possible: newsletter registration no longer works, links no longer forward, and many more.","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:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/","og_locale":"en_US","og_type":"article","og_title":"Javascript Error Logging With The Google Tag Manager","og_description":"If the Google Tag Manager (GTM) is installed on a website, JavaScript errors can be caused both by the page itself and by the GTM. For online marketers who work with the GTM, it is particularly important to avoid possible errors caused by the GTM.\u00a0 In online shops, such errors can, in the worst case scenario, occur during the checkout process and thus prevent customers from completing their order. Of course, other types of disruptions are also possible: newsletter registration no longer works, links no longer forward, and many more.","og_url":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/","og_site_name":"e-dialog","article_publisher":"https:\/\/www.facebook.com\/edialog.group","article_published_time":"2018-01-10T00:00:00+00:00","article_modified_time":"2026-02-26T13:38:01+00:00","og_image":[{"width":2200,"height":1180,"url":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","type":"image\/png"}],"author":"digitalists","twitter_card":"summary_large_image","twitter_misc":{"Written by":"digitalists","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/#article","isPartOf":{"@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/"},"author":{"name":"digitalists","@id":"https:\/\/e-dialog.group\/en\/#\/schema\/person\/7b481e2ac90c21e4dc393821d35bb518"},"headline":"Javascript Error Logging With The Google Tag Manager","datePublished":"2018-01-10T00:00:00+00:00","dateModified":"2026-02-26T13:38:01+00:00","mainEntityOfPage":{"@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/"},"wordCount":462,"publisher":{"@id":"https:\/\/e-dialog.group\/en\/#organization"},"image":{"@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","articleSection":["Analytics","Analytics"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/","url":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/","name":"Javascript Error Logging With The Google Tag Manager - e-dialog","isPartOf":{"@id":"https:\/\/e-dialog.group\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/#primaryimage"},"image":{"@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","datePublished":"2018-01-10T00:00:00+00:00","dateModified":"2026-02-26T13:38:01+00:00","description":"If the Google Tag Manager (GTM) is installed on a website, JavaScript errors can be caused both by the page itself and by the GTM. For online marketers who work with the GTM, it is particularly important to avoid possible errors caused by the GTM.\u00a0 In online shops, such errors can, in the worst case scenario, occur during the checkout process and thus prevent customers from completing their order. Of course, other types of disruptions are also possible: newsletter registration no longer works, links no longer forward, and many more.","breadcrumb":{"@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/#primaryimage","url":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","contentUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","width":2200,"height":1180,"caption":"|"},{"@type":"BreadcrumbList","@id":"https:\/\/e-dialog.group\/en\/blog\/javascript-error-logging-with-the-google-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/e-dialog.group\/en\/"},{"@type":"ListItem","position":2,"name":"Javascript Error Logging With The Google Tag Manager"}]},{"@type":"WebSite","@id":"https:\/\/e-dialog.group\/en\/#website","url":"https:\/\/e-dialog.group\/en\/","name":"e-dialog","description":"Data-driven Marketing &amp; Strategie","publisher":{"@id":"https:\/\/e-dialog.group\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/e-dialog.group\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/e-dialog.group\/en\/#organization","name":"e-dialog","url":"https:\/\/e-dialog.group\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/e-dialog.group\/en\/#\/schema\/logo\/image\/","url":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/06\/e-dialog-logo.svg","contentUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/06\/e-dialog-logo.svg","width":1,"height":1,"caption":"e-dialog"},"image":{"@id":"https:\/\/e-dialog.group\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/edialog.group","https:\/\/www.linkedin.com\/company\/e-dialog-gmbh\/","https:\/\/www.instagram.com\/e_dialog\/","https:\/\/www.tiktok.com\/@e_dialog"],"description":"Bei e-dialog gestalteten wir gemeinsam die Zukunft des data-driven Marketings - mit einem gro\u00dfartigen Team aus passionierten Expert*innen.","email":"kontakt@e-dialog.group","telephone":"+43 1 309 09 09","legalName":"e-dialog GmbH"},{"@type":"Person","@id":"https:\/\/e-dialog.group\/en\/#\/schema\/person\/7b481e2ac90c21e4dc393821d35bb518","name":"digitalists","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g","caption":"digitalists"},"sameAs":["https:\/\/e-dialog.group"],"url":"https:\/\/e-dialog.group\/en\/blog\/author\/digitalists\/"}]}},"_links":{"self":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts\/12718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/comments?post=12718"}],"version-history":[{"count":1,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts\/12718\/revisions"}],"predecessor-version":[{"id":13164,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts\/12718\/revisions\/13164"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/media\/4804"}],"wp:attachment":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/media?parent=12718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/categories?post=12718"},{"taxonomy":"channel","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/channel?post=12718"},{"taxonomy":"goal","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/goal?post=12718"},{"taxonomy":"technology","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/technology?post=12718"},{"taxonomy":"c-year","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/c-year?post=12718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}