Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Google Analytics in web worker using Partytown #218

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Wituareard
Copy link
Collaborator

The library Partytown enables loading Google Analytics in a web worker, which can significantly improve website performance and as a result boost search engine rankings.

According to their website, Partytown is still in beta because it doesn't yet support arbitrary scripts. But for Google Analytics and other popular analytics tools it's already being used by companies like Notion, Upwork, Walmart and ExpressVPN (list).

Copy link

netlify bot commented Oct 5, 2024

Deploy Preview for pauseai ready!

Name Link
🔨 Latest commit 5cb3833
🔍 Latest deploy log https://app.netlify.com/sites/pauseai/deploys/672aab6df2f9ab0008184d03
😎 Deploy Preview https://deploy-preview-218--pauseai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Wituareard
Copy link
Collaborator Author

In my test, the Lighthouse performance score changed from 73 to 98.

@PauseAI PauseAI deleted a comment from netlify bot Oct 5, 2024
Copy link
Collaborator

@anthonybailey anthonybailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. I suggest we don't use Partytown for anything else yet, but agree that wrapping Google analytics in particular seems well-established, and the net change to performance measurements is compelling.

@Wituareard
Copy link
Collaborator Author

Something that should be monitored because it is hard to test is ad conversions

@Wituareard
Copy link
Collaborator Author

The Google Analytics team seems to be working on web worker integration themselves and additionally their implementation might cause issues with Partytown: QwikDev/partytown#635

We should wait with merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants