Comments (9)
I'll send you a link in a few hours.
from analytics.
The initial issue you mentioned appeared to be caused by Cloudflare, which sits in-front of your deployment. We recently switched to a more loose caching policy, allowing Cloudflare to cache the script, which should resolve the issue you mentioned.
To make sure, I made an experiment that compares the Next.js 13 starter in 4 different environments:
- Without Audiences
- With Audiences
- Without Audiences + Cloudflare
- With Audiences + Cloudflare
A ran this test multiple times and there was no notable difference for environments that had Audiences enabled.
I'll close this issue for now.
It might be worth to experimenting with removing Google Tag Manager as well, which could be the cause of the slow down.
from analytics.
Hi there! Mind sharing a preview URL for this?
from analytics.
It is currently on my work-in-progress website. Here is the link https://www.miletadulovic.me/
When you do a hard reload Command + Shift + R (Ctrl + Shift + R) while the network tab is open in the console, you'll see script.js
file that is 1.1-1.3 kb heavy and loading for a long time. I just rechecked it, It took 3.57 sec.
This really reduces page speed score on both Vercel analytics, and Google Page Speed analytics. I first wasn't sure from where is this coming, but after disabling Vercel analytics, this file vanished from the network tab.
Here are the headers for this file
from analytics.
Any updates on this? @timolins
from analytics.
@M1ck0 I saw that the script is currently embedded on your page and did several speed score tests (Google Page Speed, etc) and did not see anything poping up because of that longer script load time. (It's async
and soon defer
so will not block anything)
Can you share us some results that shows the script impacts your page?
from analytics.
@timolins Here are the screenshots
Take a look at Time to Interactive and Total Blocking time. The difference is enormous.
Also, look at the treemap, when is the first frame presented to a user?
Are you sure that you can't see anything wrong with this? And let me also say that the page I am testing is just a page with few lines of text, no API calls, no interactions, or anything.
When I removed @vercel/analytics
it was much better. With that package when I try to load the site in incognito, I always see blank (white) screen for like second or two (based on my connection) and then page appears.
from analytics.
Interesting, thanks for investigating! Mind sharing a preview deployment link with us that has Audiences enabled? So we can compare as well.
from analytics.
@timolins I added it to the main deployment so you can go check it there.
from analytics.
Related Issues (20)
- Support for Arc Browser HOT 2
- User Opt in feature HOT 2
- Redirect / rename scripts? HOT 7
- Can't use server track in Remix HOT 5
- @vercel/analytics throws errors HOT 4
- Error 400 when using analytics/server track in server actions HOT 2
- Vercel build failed with Turborepo and multiple apps deployed HOT 5
- Vercel Analytics Endpoints HOT 1
- Docs: Specify if `track` runs in development mode or not HOT 1
- Page changes are no longer tracked in SvelteKit 2 HOT 9
- Feature Request: Allow nonce as optional prop in analytics component for content security policy HOT 1
- Integration with Docusaurus HOT 1
- Module resolution warnings under Yarn PnP: `Unable to resolve path to module '@vercel/analytics/react'.eslintimport/no-unresolved` HOT 5
- Usage in redirect routes HOT 8
- Referrers panel seems to not be getting data HOT 6
- Subdomain analytics HOT 6
- BeforeSend don't work in app directory RSC HOT 1
- Request Bodies with "o" Object Should be Encoded HOT 6
- Custom events does not work in the error boundary HOT 3
- Custom events from routes / SSR HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analytics.