> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/en/development-guide/troubleshooting/javascript-sdk-cdn-issue.md).

# \[JavaScript SDK] Troubleshooting CDN Issues

## 1. Background

Starting from 9:00 AM on Thursday, May 2, 2024, the certificate for the CDN (cdn.jsdelivr.net) previously in use expired, causing an issue where 'SDK initialization' would not complete for those using the Hackle SDK installed via HTML script.

In response, we took action to allow use of the updated CDN (fastly.jsdelivr.net). Apply the code below to resolve this.

## 2. Resolution

### 2.1. SDK Initialization

* The CDN path has been changed to fastly.jsdelivr.net.

```html
<!-- Add inside head tag as before -->
<script src="https://fastly.jsdelivr.net/npm/@hackler/javascript-sdk@11.32.1/lib/index.browser.umd.min.js"></script>
<script>
  // Initialize with YOUR_BROWSER_SDK_KEY
  window.hackleClient = Hackle.createInstance("YOUR_BROWSER_SDK_KEY");
</script>
```

### 2.2. If you are using the User Explorer (DevTools) feature

**If you are using the 'User Explorer (DevTools)' feature**

* The CDN path has been changed to fastly.jsdelivr.net.

```html
<script src="https://fastly.jsdelivr.net/npm/@hackler/javascript-devtools@[1.0.1 or 1.0.2]/lib/index.browser.umd.min.js"></script>
<script>
  const config = {
    devTool: HackleDevTools.default,
  };

  // Initialize with YOUR_BROWSER_SDK_KEY
  const hackleClient = Hackle.createInstance(YOUR_BROWSER_SDK_KEY, config);

  // Trigger this when you want to show the User Explorer.
  hackleClient.showUserExplorer()

  // Trigger this when you want to close the User Explorer.
  hackleClient.hideUserExplorer()

</script>
```

### 2.3. If you are using GTM

1. Go to the relevant container at <https://tagmanager.google.com/>.
2. Click the Templates menu.
3. Click Hackle Browser SDK.

   ![](/files/QwrGCdV8d1l1wamoP7RF)
4. Click the Code menu.

   ![](/files/wNHrygjj0lfwmAGPFl1I)
5. Change cdn.jsdelivr.net on line 9 to fastly.jsdelivr.net.
   1. Change **cdn.** to **fastly.**
6. Click the Permission menu.

   ![](/files/jdfY75SDuBX7IpVTX4rD)
7. Change **cdn.** to **fastly.** in Injects scripts.

   ![](/files/HH4lw1DRwKVWsR7mr8Xm)
8. Click 'Save' in the upper right corner to save.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hackle.io/en/development-guide/troubleshooting/javascript-sdk-cdn-issue.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
