PHPackages                             justbetter/statamic-partytown - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. justbetter/statamic-partytown

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

justbetter/statamic-partytown
=============================

0.0.2(2y ago)3989[1 issues](https://github.com/justbetter/statamic-partytown/issues)PHP

Since May 28Pushed 2y ago4 watchersCompare

[ Source](https://github.com/justbetter/statamic-partytown)[ Packagist](https://packagist.org/packages/justbetter/statamic-partytown)[ RSS](/packages/justbetter-statamic-partytown/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Statamic partytown
==================

[](#statamic-partytown)

Scripts like GTM have a massive negative impact on performance and pagespeed, to remedy this scripts like [Partytown](https://partytown.builder.io/) have been made. Which allows you to keep your analytics but reclaim *some* of the performance.

[![Pagespeed Scores](https://github.com/justbetter/statamic-partytown/raw/master/docs/assets/pagespeed.png)](https://github.com/justbetter/statamic-partytown/raw/master/docs/assets/pagespeed.png)

Installation
------------

[](#installation)

- Install using `composer require justbetter/statamic-partytown`
- Execute `yarn add @builder.io/partytown`
- [Configure Vite (or your other compiler) to copy the partytown files](https://partytown.builder.io/copy-library-files#vite) (however instead of dist it should go in public)
- Add `/public/~partytown` to your .gitignore

### Load Partytown in on your head

[](#load-partytown-in-on-your-head)

If you're using antlers you should add the following to your head

```

    ...
    {{ partial:if_exists src="statamic-partytown::head" }}
    ...

```

and in case of blade you can include it using the following

```

    ...
    @include('statamic-partytown::head')
    ...

```

### Optional

[](#optional)

If you want to manage and add scripts to the page with partytown outside of your own built templates you can publish the Partytown Settings global:

```
php artisan vendor:publish --provider="JustBetter\StatamicPartytown\ServiceProvider" --tag=statamic-content
```

To speed up Partytown communication even more you can configure [Atomics](https://partytown.builder.io/atomics) simply by adding a few headers.

Usage
-----

[](#usage)

Partytown is running by default **if** you are running your site on https.

To use Partytown simply change the scripts you want to run in partytown from `` or `` into `
