Skip to content

Commit 0d0bbc2

Browse files
authored
Merge pull request #7011 from segmentio/prigiattiperrut-patch-5
Adding new topic to FAQ about ChunkLoadError
2 parents 49f0bc2 + bb7c8e2 commit 0d0bbc2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/connections/sources/catalog/libraries/website/javascript/troubleshooting.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ var writeKey;
3030
ENV === 'production' ? writeKey = 'A' : writeKey = 'B';
3131
```
3232

33+
## How do I resolve the 'Failed to Load Analytics.js ChunkLoadError'?
34+
35+
The error can occur for different reasons:
36+
37+
* 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).
38+
39+
* 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).
40+
41+
* Browser cache: Clear the browser cache, as this is a common cause for `ChunkLoadError`.
42+
43+
* Cloudflare caching: If you use Cloudflare to proxy Segment, disable caching for the Segment JS file.
44+
3345
## Do you see events appear in your debugger?
3446

3547
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.

0 commit comments

Comments
 (0)