Astro

There is a first-class Astro integration for partytown.

Automatic Setup

Astro includes a CLI tool for adding integrations. Using the astro add command will automatically install Partytown and configure your project.

npx astro add partytown
yarn astro add partytown
pnpx astro add partytown

Partytown Script

Add type: 'text/partytown' attribute to any scripts you want to be handled by Partytown.

<script type="text/partytown" src="https://example.com/analytics.js"></script>

Note that the Astro Partytown integration already handles copying the library files to the correct location.

Made with ❤️ by

© 2024 Builder.io, Inc.

Introducing Visual Copilot.

100% free. Supports all popular frameworks.

Try Visual Copilot