From 7510bbebb8478e8639ddf57f9974311c0ee62399 Mon Sep 17 00:00:00 2001 From: prigiattiperrut <47340158+prigiattiperrut@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:21:23 +0100 Subject: [PATCH 1/3] Update troubleshooting.md --- .../libraries/website/javascript/troubleshooting.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md b/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md index a0364afa82..fb804b3c34 100644 --- a/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md +++ b/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md @@ -30,6 +30,18 @@ var writeKey; ENV === 'production' ? writeKey = 'A' : writeKey = 'B'; ``` +## How to Resolve 'Failed to Load Analytics.js ChunkLoadError' + +This error can occur for a few reasons: + +1. Snippet Syntax: Ensure the Segment snippet is correctly added to the page. Check for any missing or extra characters. Please follow our guide [here](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-install-segment-to-your-site). + +2. NPM Package: If using Segment via NPM, refer to this [guide](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2b-install-segment-as-a-npm-package). + +3. Browser Cache: Try clearing the browser cache, as this is a common cause for ChunkLoadError. + +4. Cloudflare Caching: If you're using Cloudflare, disable caching for the Segment JS file. + ## Do you see events appear in your debugger? When you reload the page, does your debugger show a new [`page`](/docs/connections/spec/page)? You can also check the JavaScript console in the browser and manually fire an event, like an Identify call, which would show up in the debugger. From 5b2a3f3cfc2065319a5a326beb80cc03b77c79d1 Mon Sep 17 00:00:00 2001 From: prigiattiperrut <47340158+prigiattiperrut@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:24:26 +0100 Subject: [PATCH 2/3] Update troubleshooting.md --- .../catalog/libraries/website/javascript/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md b/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md index fb804b3c34..621daef92c 100644 --- a/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md +++ b/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md @@ -40,7 +40,7 @@ This error can occur for a few reasons: 3. Browser Cache: Try clearing the browser cache, as this is a common cause for ChunkLoadError. -4. Cloudflare Caching: If you're using Cloudflare, disable caching for the Segment JS file. +4. Cloudflare Caching: If you're using Cloudflare to proxy Segment, please disable caching for the Segment JS file. ## Do you see events appear in your debugger? From bb7c8e2079feed81e4620ea7ff64432a76394770 Mon Sep 17 00:00:00 2001 From: stayseesong <83784848+stayseesong@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:23:16 -0700 Subject: [PATCH 3/3] Update src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md --- .../libraries/website/javascript/troubleshooting.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md b/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md index 621daef92c..2f6cb74cfc 100644 --- a/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md +++ b/src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md @@ -30,17 +30,17 @@ var writeKey; ENV === 'production' ? writeKey = 'A' : writeKey = 'B'; ``` -## How to Resolve 'Failed to Load Analytics.js ChunkLoadError' +## How do I resolve the 'Failed to Load Analytics.js ChunkLoadError'? -This error can occur for a few reasons: +The error can occur for different reasons: -1. Snippet Syntax: Ensure the Segment snippet is correctly added to the page. Check for any missing or extra characters. Please follow our guide [here](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-install-segment-to-your-site). +* Snippet syntax: Ensure you correctly added the Segment snippet to the page. Check for any missing or extra characters. Follow [this guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-install-segment-to-your-site). -2. NPM Package: If using Segment via NPM, refer to this [guide](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2b-install-segment-as-a-npm-package). +* NPM package: If you're using Segment through NPM, refer to [this guide](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2b-install-segment-as-a-npm-package). -3. Browser Cache: Try clearing the browser cache, as this is a common cause for ChunkLoadError. +* Browser cache: Clear the browser cache, as this is a common cause for `ChunkLoadError`. -4. Cloudflare Caching: If you're using Cloudflare to proxy Segment, please disable caching for the Segment JS file. +* Cloudflare caching: If you use Cloudflare to proxy Segment, disable caching for the Segment JS file. ## Do you see events appear in your debugger?