Frameworks

Astro

Islands use the React or Vue guide. A plain page is one script tag.

Astro ships whichever island framework you already use, so for islands follow React or Vue.

For a plain Astro page, this is the whole integration:

src/layouts/Base.astro
<script>
  import { PulseClient } from '@thepulseapi/sdk';

  const pulse = new PulseClient();
  pulse.init({
    apiKey: import.meta.env.PUBLIC_PULSE_API_KEY,
    organizationId: import.meta.env.PUBLIC_PULSE_ORG_ID,
  });
</script>
pnpm add @thepulseapi/sdk

Or skip the install entirely and use the CDN build:

<script is:inline src="https://cdn.thepulseapi.com/sdk/v0/pulse.iife.js"></script>