{"id":1060,"date":"2024-01-09T15:13:07","date_gmt":"2024-01-09T15:13:07","guid":{"rendered":"https:\/\/capturly.com\/documentation\/?p=1060"},"modified":"2024-01-10T08:54:14","modified_gmt":"2024-01-10T08:54:14","slug":"javascript-error-tracking","status":"publish","type":"post","link":"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/","title":{"rendered":"JavaScript Error Tracking"},"content":{"rendered":"\n<div class=\"su-note\"  style=\"border-color:#dadadc;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#f4f4f6;border-color:#ffffff;color:#646f87;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;\">JavaScript is a widely used programming language for creating interactive and dynamic web pages. However, errors are an inevitable part of coding. This documentation aims to provide a simple guide for users to understand common JavaScript errors and how to troubleshoot them.<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_JavaScript_errors\"><\/span>What are JavaScript errors?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>JavaScript errors are problems or bugs in JavaScript code that occur during the execution of a script in a web browser or any JavaScript environment. These errors can disrupt the normal flow of a program, leading to unexpected behavior or failure of certain functionalities on a website or application.<\/p>\n\n\n\n<p><a href=\"https:\/\/capturly.com\/features\/javascript-errors\" target=\"_blank\" rel=\"noreferrer noopener\">Capturly&#8217;s JavaScript Error Tracking<\/a> feature collects these errors from your website automatically. With the integration of session recordings, you can replay those user sessions where errors occurred.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_the_common_JavaScript_errors\"><\/span>What are the common JavaScript errors?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul>\n<li><strong>Uncaught:<\/strong> Indicates that the error was not handled by your code.<\/li>\n\n\n\n<li><strong>SyntaxError:<\/strong> Specifies that there is a mistake in the code structure.<\/li>\n\n\n\n<li><strong>TypeError:<\/strong> Indicates that an operation is performed on a value of the wrong type.<\/li>\n\n\n\n<li><strong>Unexpected token:<\/strong> Points to the specific part of the code causing the issue.<\/li>\n\n\n\n<li><strong>Invalid array length:<\/strong> Specifies the nature of the error, indicating that the attempted operation involves an invalid array length.<\/li>\n\n\n\n<li><strong>Cannot read property &#8216;property_name&#8217; of null:<\/strong> Specifies that the attempted operation involves accessing a property on a null value.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CORS_errors_are_detected_in_Capturly_What_does_it_mean\"><\/span>CORS errors are detected in Capturly. What does it mean?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/capturly.com\" target=\"_blank\" rel=\"noreferrer noopener\">Capturly<\/a> may encounter difficulties capturing error messages when they originate from scripts with different origins. This issue is commonly known as a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/CORS\/Errors\" target=\"_blank\" rel=\"noreferrer noopener\">CORS (Cross-Origin Resource Sharing)<\/a> error, and it arises due to security restrictions on cross-origin requests.<\/p>\n\n\n\n<p>When your webpage encounters a CORS error, you&#8217;ll receive the following message:<\/p>\n\n\n\n<div class=\"su-note\"  style=\"border-color:#dadadc;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#f4f4f6;border-color:#ffffff;color:#646f87;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;\"><em>&#8220;Unfortunately, due to security restrictions imposed by browser policies, we are unable to provide you with specific details about some errors, as they appear to be originating from a different domain (cross-origin). This prevents us from accessing the necessary error details. Please check out our documentation page for more information.&#8221;<\/em><\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"196\" src=\"https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-1024x196.png\" alt=\"CORS (Cross-Origin Resource Sharing) error message in Capturly under the JavaScript error page\" class=\"wp-image-1082\" srcset=\"https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-1024x196.png 1024w, https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-300x58.png 300w, https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-768x147.png 768w, https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-1536x295.png 1536w, https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-60x12.png 60w, https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-150x29.png 150w, https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly.png 1731w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>To address CORS issues, consider the following solutions:<\/strong><\/p>\n\n\n\n<span class=\"su-highlight\" style=\"background:#e6e7ee;color:#ff5858\">&nbsp;<strong>1. Add crossorigin attribute to your script tags<\/strong>&nbsp;<\/span>\n\n\n\n<p>Include the `crossorigin=&#8221;anonymous&#8221;` attribute in your script tags to enhance compatibility and allow the browser to make cross-origin requests without sending credentials.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>&lt;script src=\"https:\/\/othersite.com\/script.js\" crossorigin=\"anonymous\"&gt;&lt;\/script&gt;<\/em><\/code><\/pre>\n\n\n\n<span class=\"su-highlight\" style=\"background:#e6e7ee;color:#ff5858\">&nbsp;<strong>2. Server-Side Configuration<\/strong>&nbsp;<\/span>\n\n\n\n<p>Configure your server to include the appropriate CORS headers in its responses. The most permissive option is to allow all origins:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>Access-Control-Allow-Origin: *<\/em><\/code><\/pre>\n\n\n\n<p><strong>Note:<\/strong> If your script comes from a CDN source, it likely already includes the necessary CORS headers in its response.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_SyntaxError\"><\/span>What is a SyntaxError?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/SyntaxError\" target=\"_blank\" rel=\"noreferrer noopener\">SyntaxError<\/a> is like grammatical mistakes in a programming language. Just as using wrong grammar makes a sentence unclear or incorrect in English, syntax errors occur when code is written in a way that the computer can&#8217;t understand. It&#8217;s like missing punctuation or jumbling words in a sentence, which makes it confusing or wrong for the computer.<\/p>\n\n\n\n<div class=\"su-note\"  style=\"border-color:#<em>ffef0df<\/em>;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#&lt;em&gt;ffef0df&lt;\/em&gt;;border-color:#<em>ffef0df<\/em>;color:#333333;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><em><strong>Technical definition:<\/strong> Syntax errors in programming are mistakes in the code&#8217;s structure, violating the grammatical rules of the programming language. In JavaScript, this might include missing semicolons, unclosed braces, misplaced parentheses, or incorrect use of language constructs, leading to failure in code execution.<\/em><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example\"><\/span>Example<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>javascript\n\/\/ Incorrect syntax\nlet x = 10;\nif x === 10 {\n  console.log(\"x is 10\");\n}\n\n\/\/ Correct syntax\nlet x = 10;\nif(x === 10){\n  console.log(\"x is 10\");\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Potential_effects_on_user_experience\"><\/span>Potential effects on user experience<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Syntax errors in the frontend code can lead to various negative effects on user experience, including:<\/p>\n\n\n\n<ul>\n<li><strong>Non-functional web pages:<\/strong> The webpage might not load properly or at all, leading to a blank or incomplete display.<\/li>\n\n\n\n<li><strong>Broken interactivity:<\/strong> Interactive elements like buttons, links, and forms may not work, frustrating users who expect certain actions.<\/li>\n\n\n\n<li><strong>Layout issues: <\/strong>The visual layout might appear broken or disorganized, affecting the aesthetic appeal and usability.<\/li>\n\n\n\n<li><strong>Inaccessibility:<\/strong> Key functionality might become inaccessible, hindering users&#8217; ability to navigate or use the website effectively.<\/li>\n<\/ul>\n\n\n\n<p>These issues can cause user frustration, diminish trust in the website, and potentially lead to users leaving the site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting_tips\"><\/span>Troubleshooting tips<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul>\n<li><strong>Refer to the official documentation:<\/strong> JavaScript has comprehensive documentation available online. Websites like MDN Web Docs (Mozilla Developer Network) provide detailed information about JavaScript syntax, functions, and features.<\/li>\n\n\n\n<li><strong>Check syntax rules:<\/strong> Familiarize yourself with basic JavaScript syntax rules, such as proper placement of semicolons, curly braces, parentheses, and keywords.<\/li>\n\n\n\n<li><strong>Learn from examples:<\/strong> The documentation often includes examples that illustrate correct syntax. Analyze these examples to gain insights into how different language constructs should be used.<\/li>\n\n\n\n<li><strong>Use developer tools: <\/strong>Modern web browsers come with built-in developer tools that can help identify syntax errors in your code. The console tab often provides information about the specific syntax error and its location.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_ReferenceError\"><\/span>What is a ReferenceError?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Imagine trying to call a friend whose phone number you don&#8217;t have. In programming, a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/ReferenceError\" target=\"_blank\" rel=\"noreferrer noopener\">Reference Error<\/a> is similar\u2014it happens when the program tries to use something (like a variable or function) that it doesn&#8217;t know or can&#8217;t find. This usually occurs because it hasn&#8217;t been properly set up or is misspelled.<\/p>\n\n\n\n<div class=\"su-note\"  style=\"border-color:#<em>ffef0df<\/em>;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#&lt;em&gt;ffef0df&lt;\/em&gt;;border-color:#<em>ffef0df<\/em>;color:#333333;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><em><strong>Technical definition: <\/strong>Reference errors occur when the code attempts to use a variable or function that has not been defined, often leading to a message stating that an object is &#8216;undefined&#8217; or &#8216;null&#8217;.<\/em><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example-2\"><\/span>Example<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>javascript\n\/\/ Trying to use an undefined variable\nconsole.log(nonExistentVariable);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Potential_effects_on_user_experience-2\"><\/span>Potential effects on user experience<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Reference errors in a web application can negatively impact user experience in several ways:<\/p>\n\n\n\n<ul>\n<li><strong>Functional breakdown:<\/strong> Critical functionality might not work, leading to features like buttons, forms, or navigation elements becoming non-responsive.<\/li>\n\n\n\n<li><strong>Incomplete or broken content: <\/strong>Web pages may fail to load completely or correctly, resulting in missing content or layout issues.<\/li>\n\n\n\n<li><strong>Error messages: <\/strong>Users might encounter error messages or alerts, leading to confusion and a lack of understanding of what went wrong.<\/li>\n\n\n\n<li><strong>Reduced trust and credibility: <\/strong>Frequent errors can diminish users&#8217; trust in the reliability and professionalism of the website or application.<\/li>\n\n\n\n<li><strong>Frustration and disengagement:<\/strong> Such issues can frustrate users, potentially causing them to leave the site and negatively affecting overall engagement and satisfaction.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting_tips-2\"><\/span>Troubleshooting tips<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul>\n<li><strong>Double-check definitions:<\/strong> Ensure all variables and functions are declared before they are used. This includes checking for any missed var, let, or const statements.<\/li>\n\n\n\n<li><strong>Verify scope:<\/strong> Variables and functions have different scopes (global or local). Verify that the variable or function is accessible in the scope where it&#8217;s being used.<\/li>\n\n\n\n<li><strong>Naming consistency:<\/strong> Ensure that variable and function names are consistent throughout the code. Pay attention to case sensitivity in JavaScript, as it distinguishes between myVariable and MyVariable.<\/li>\n\n\n\n<li><strong>Check for typos: <\/strong>A common cause of reference errors is misspelling variable or function names. Double-check for any typographical errors in your code.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_TypeError\"><\/span>What is a TypeError?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Imagine trying to use a hairdryer to make toast. Just like the hairdryer isn&#8217;t designed for toasting bread, in computer programming, a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/TypeError\" target=\"_blank\" rel=\"noreferrer noopener\">Type Error<\/a> happens when you try to do something with a piece of data that doesn&#8217;t make sense for its type. For example, if you treat a number as if it were a piece of text (like trying to capitalize the number 5), the computer gets confused because the action doesn&#8217;t fit the data type. This mismatch leads to a &#8220;type error.&#8221; It&#8217;s like a miscommunication where the computer expects one kind of data but gets something else instead.<\/p>\n\n\n\n<p><em><div class=\"su-note\"  style=\"border-color:#<em>ffef0df<\/em>;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#&lt;em&gt;ffef0df&lt;\/em&gt;;border-color:#<em>ffef0df<\/em>;color:#333333;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><strong>Technical definition:<\/strong> Type errors occur when operations are attempted on a value of an incompatible type, like trying to execute a string method on a number. This is common in JavaScript due to its dynamic typing.<\/em><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example-3\"><\/span>Example<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Example:\njavascript\nlet numberValue = 5;\nlet result = numberValue.toUpperCase(); \/\/ Type Error: numberValue.toUpperCase is not a function<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Potential_effects_on_user_experience-3\"><\/span>Potential effects on user experience<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Reference errors in a web application can significantly affect the user experience in various ways:<\/p>\n\n\n\n<ul>\n<li><strong>Malfunctioning features:<\/strong> Essential features may not function as intended, causing frustration and confusion.<\/li>\n\n\n\n<li><strong>Broken interactivity:<\/strong> Interactive elements like buttons, links, or forms might become unresponsive.<\/li>\n\n\n\n<li><strong>Partial or incomplete page loading:<\/strong> Web pages may fail to load fully or display correctly.<\/li>\n\n\n\n<li><strong>Unexpected behavior:<\/strong> Users might encounter erratic or unpredictable behavior in the application.<\/li>\n\n\n\n<li><strong>Error messages: <\/strong>Display of technical error messages, which can be confusing and uninformative for the end-user.<\/li>\n<\/ul>\n\n\n\n<p>These issues can lead to user dissatisfaction, decreased trust in the application, and a higher likelihood of users abandoning the site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting_tips-3\"><\/span>Troubleshooting tips<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul>\n<li><strong>Review variable names:<\/strong> Double-check the names of the variables you are using. Ensure consistency in spelling and case sensitivity.<\/li>\n\n\n\n<li><strong>Be mindful of typos:<\/strong> Typos are a common source of reference errors. Pay attention to your code and look out for small spelling mistakes that might lead to undefined variables.<\/li>\n\n\n\n<li><strong>Use descriptive names:<\/strong> Employ meaningful and descriptive variable names. This not only reduces the chances of typos but also enhances code readability.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_RangeError\"><\/span>What is a RangeError?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Imagine you have a set of boxes that can each hold a certain number of items. A <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/RangeError\" target=\"_blank\" rel=\"noreferrer noopener\">Range Error<\/a> in programming is like trying to put more items in a box than it can hold, or maybe even trying to have a negative number of items. In computers, this error occurs when a program tries to handle a number or amount that is too big, too small, or just doesn&#8217;t make sense within its rules. It&#8217;s like overloading or underloading based on set limits.<\/p>\n\n\n\n<p><em><div class=\"su-note\"  style=\"border-color:#ffef0df;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#ffef0df;border-color:#ffef0df;color:#333333;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><strong>Technical definition:<\/strong> RangeError occurs when a numeric value is outside the valid range. This typically occurs when executing a function or operation that has predefined constraints on the acceptable range of input values. For instance, instantiating an array with a length that is not a positive integer, or when arithmetic operations result in a value that exceeds the representable range of the JavaScript number type, would trigger this error.<\/em><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example-4\"><\/span>Example<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>javascript\nlet arr = new Array(-1); \/\/ RangeError: Invalid array length<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Potential_effects_on_user_experience-4\"><\/span>Potential effects on user experience<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Range errors in user experience can lead to several issues:<\/p>\n\n\n\n<ul>\n<li><strong>Crashes and freezes:<\/strong> The application may crash or freeze if it encounters a range error, leading to a complete halt in user interaction.<\/li>\n\n\n\n<li><strong>Incorrect or incomplete functionality:<\/strong> Functions that rely on numerical values might behave incorrectly or fail to complete their tasks.<\/li>\n\n\n\n<li><strong>Unexpected behavior:<\/strong> Users might experience erratic or unpredictable behavior from the application, leading to confusion.<\/li>\n\n\n\n<li><strong>Error messages: <\/strong>Users could be confronted with error messages, which might be confusing if not clearly explained.<\/li>\n\n\n\n<li><strong>Loss of user data or progress:<\/strong> In some cases, a range error might result in the loss of user-entered data or progress within the application.<\/li>\n<\/ul>\n\n\n\n<p>Overall, range errors can significantly disrupt the user&#8217;s interaction with the application, leading to a poor experience.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting_tips-4\"><\/span>Troubleshooting tips<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul>\n<li><strong>Validate input ranges:<\/strong> Before performing operations that involve numeric values, ensure that the values fall within a valid range. Check for edge cases and unexpected input.<\/li>\n\n\n\n<li><strong>Use conditional statements:<\/strong> Implement conditional statements to check if numeric values are within acceptable ranges before using them in operations or calculations.<\/li>\n\n\n\n<li><strong>Error handling:<\/strong> Use try-catch blocks in your code to handle potential range errors gracefully and provide informative feedback to users.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What are JavaScript errors? JavaScript errors are problems or bugs in JavaScript code that occur during the execution of a script in a web browser or any JavaScript environment. These errors can disrupt the normal flow of a program, leading to unexpected behavior or failure of certain functionalities on a website or application. Capturly&#8217;s JavaScript [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JavaScript Error Tracking - Capturly Documentation<\/title>\n<meta name=\"description\" content=\"Discover Capturly&#039;s guide to JavaScript Error Tracking: Learn about common errors and practical troubleshooting tips to enhance UX.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Error Tracking - Capturly Documentation\" \/>\n<meta property=\"og:description\" content=\"Discover Capturly&#039;s guide to JavaScript Error Tracking: Learn about common errors and practical troubleshooting tips to enhance UX.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/\" \/>\n<meta property=\"og:site_name\" content=\"Capturly Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-09T15:13:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-10T08:54:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-1024x196.png\" \/>\n<meta name=\"author\" content=\"Gabriella J\u00e1mbor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gabriella J\u00e1mbor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/\",\"url\":\"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/\",\"name\":\"JavaScript Error Tracking - Capturly Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/capturly.com\/documentation\/#website\"},\"datePublished\":\"2024-01-09T15:13:07+00:00\",\"dateModified\":\"2024-01-10T08:54:14+00:00\",\"author\":{\"@id\":\"https:\/\/capturly.com\/documentation\/#\/schema\/person\/0b8e591793613c3903a843ba859ffa8d\"},\"description\":\"Discover Capturly's guide to JavaScript Error Tracking: Learn about common errors and practical troubleshooting tips to enhance UX.\",\"breadcrumb\":{\"@id\":\"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/capturly.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript Error Tracking\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/capturly.com\/documentation\/#website\",\"url\":\"https:\/\/capturly.com\/documentation\/\",\"name\":\"Capturly Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/capturly.com\/documentation\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/capturly.com\/documentation\/#\/schema\/person\/0b8e591793613c3903a843ba859ffa8d\",\"name\":\"Gabriella J\u00e1mbor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/capturly.com\/documentation\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5044a2221efb4543c929245d16082362?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5044a2221efb4543c929245d16082362?s=96&d=mm&r=g\",\"caption\":\"Gabriella J\u00e1mbor\"},\"sameAs\":[\"http:\/\/capturly.com\"],\"url\":\"https:\/\/capturly.com\/documentation\/author\/gabriella\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Error Tracking - Capturly Documentation","description":"Discover Capturly's guide to JavaScript Error Tracking: Learn about common errors and practical troubleshooting tips to enhance UX.","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:\/\/capturly.com\/documentation\/javascript-error-tracking\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Error Tracking - Capturly Documentation","og_description":"Discover Capturly's guide to JavaScript Error Tracking: Learn about common errors and practical troubleshooting tips to enhance UX.","og_url":"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/","og_site_name":"Capturly Documentation","article_published_time":"2024-01-09T15:13:07+00:00","article_modified_time":"2024-01-10T08:54:14+00:00","og_image":[{"url":"https:\/\/capturly.com\/documentation\/wp-content\/uploads\/2024\/01\/cors_errors_in_capturly-1024x196.png"}],"author":"Gabriella J\u00e1mbor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Gabriella J\u00e1mbor","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/","url":"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/","name":"JavaScript Error Tracking - Capturly Documentation","isPartOf":{"@id":"https:\/\/capturly.com\/documentation\/#website"},"datePublished":"2024-01-09T15:13:07+00:00","dateModified":"2024-01-10T08:54:14+00:00","author":{"@id":"https:\/\/capturly.com\/documentation\/#\/schema\/person\/0b8e591793613c3903a843ba859ffa8d"},"description":"Discover Capturly's guide to JavaScript Error Tracking: Learn about common errors and practical troubleshooting tips to enhance UX.","breadcrumb":{"@id":"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/capturly.com\/documentation\/javascript-error-tracking\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/capturly.com\/documentation\/javascript-error-tracking\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/capturly.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"JavaScript Error Tracking"}]},{"@type":"WebSite","@id":"https:\/\/capturly.com\/documentation\/#website","url":"https:\/\/capturly.com\/documentation\/","name":"Capturly Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/capturly.com\/documentation\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/capturly.com\/documentation\/#\/schema\/person\/0b8e591793613c3903a843ba859ffa8d","name":"Gabriella J\u00e1mbor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/capturly.com\/documentation\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5044a2221efb4543c929245d16082362?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5044a2221efb4543c929245d16082362?s=96&d=mm&r=g","caption":"Gabriella J\u00e1mbor"},"sameAs":["http:\/\/capturly.com"],"url":"https:\/\/capturly.com\/documentation\/author\/gabriella\/"}]}},"_links":{"self":[{"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/posts\/1060"}],"collection":[{"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/comments?post=1060"}],"version-history":[{"count":18,"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/posts\/1060\/revisions"}],"predecessor-version":[{"id":1083,"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/posts\/1060\/revisions\/1083"}],"wp:attachment":[{"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/media?parent=1060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/categories?post=1060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/capturly.com\/documentation\/wp-json\/wp\/v2\/tags?post=1060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}