Skip to content

Commit

Permalink
Merge pull request #7011 from segmentio/prigiattiperrut-patch-5
Browse files Browse the repository at this point in the history
Adding new topic to FAQ about ChunkLoadError
  • Loading branch information
stayseesong authored Sep 9, 2024
2 parents 49f0bc2 + bb7c8e2 commit 0d0bbc2
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ var writeKey;
ENV === 'production' ? writeKey = 'A' : writeKey = 'B';
```

## How do I resolve the 'Failed to Load Analytics.js ChunkLoadError'?

The error can occur for different reasons:

* 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).

* 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).

* Browser cache: Clear the browser cache, as this is a common cause for `ChunkLoadError`.

* Cloudflare caching: If you use Cloudflare to proxy Segment, 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.
Expand Down

0 comments on commit 0d0bbc2

Please sign in to comment.