TelemetryDeck / WebSDK

Add TelemetryDeck to your website or blog
Other
2 stars 1 forks source link

Documentation should tell to load the TelemetryDeck SDK async? #9

Open Timac opened 1 week ago

Timac commented 1 week ago

The installation instructions of TelemetryDeck for a website are:

<script
  src="https://cdn.telemetrydeck.com/websdk/telemetrydeck.min.js"
  data-app-id="<YOUR APP ID>"
></script>

This means that downloading the TelemetryDeck SDK is blocking the browser. Shouldn't async be used to tell the browser to download the script in parallel with the rest of the page? Or am I missing something because I don't think that TelemetryDeck need to block the rendering of your page?

<script async
  src="https://cdn.telemetrydeck.com/websdk/telemetrydeck.min.js"
  data-app-id="<YOUR APP ID>"
></script>

See the documentation here:

pichfl commented 1 week ago

Yes, we should add the keyword. No, there is no need for the script to be blocking.