Issue
When attempting to access an Analytics.js source file via a CDN URL, users encounter a 404 error with the message "Cannot GET - Invalid path or write key provided." This occurs both on aliased CDN URLs and direct Segment CDN URLs.
Product
Segment
Environment
Segment Console
Cause
The error typically occurs when the URL path or the write key used in the CDN request is incorrect or not recognized by the Segment CDN.
Resolution
Ensure that the CDN URL follows the correct format:https://<YOUR-CUSTOM-CDN>/analytics.js/v1/<WRITE_KEY>/analytics.min.js
Replace <WRITE_KEY> with the valid write key found in the source's settings under the API Keys section.
Verify that the path structure and write key are accurate and match the configuration in the Segment Console.
Additional Information
Refer to Segment documentation for custom proxy and CDN alias setup instructions to avoid path or key mismatches.