Reduce Unused Google Analytics JavaScript

How to optimize andycomputers.com

Generic SiteScore: 99/100Analyzed January 2026

Reduce Unused Google Analytics JavaScript

Medium Impact+3 points estimated

Why It Matters

Google Tag Manager is loading 51KB of unused JavaScript (31% waste), consuming unnecessary bandwidth and slowing initial page parsing.

How to Fix

Configure Google Tag Manager to load only required tracking features. Remove unused custom dimensions and events from your GA4 configuration. Consider switching to gtag.js directly if you only need basic analytics, or implement server-side tracking for better performance.

0Good

What This Score Means

A score of 99 falls in the "Good" range (50-89). While it is better than poor (0-49), you should aim for 90+ to provide an optimal user experience and maximize SEO benefits.

This site is slower than approximately 35% of similar sites. The main issues affecting performance are image optimization, JavaScript execution time, and layout stability.

Addressing these issues could improve your conversion rate by 15-20% and boost your search engine rankings.

Core Web Vitals Analysis

LCP

Largest Contentful Paint

1.2s
Good

Good: < 2.5s

Measures how long it takes for the main content to appear on screen

INP

Interaction to Next Paint

27ms
Good

Good: < 200ms

Measures how quickly the page responds to user interactions

CLS

Cumulative Layout Shift

0.08
Good

Good: < 0.1

Measures visual stability - how much content shifts during page load

AI Performance Analysis

This website has excellent performance with a score of 99/100, indicating it loads very quickly for users. The main optimization opportunity is reducing unused JavaScript from Google Analytics tracking code, which is consuming about 50 KB of unnecessary data - while this isn't currently impacting load times, removing unused portions could further streamline the site. The page has a simple, efficient loading pattern with minimal resource dependencies, though there are no preconnected origins being used (which isn't problematic given the current performance). Overall, this site is already performing at near-optimal levels with only minor tweaks needed.

Other Optimization Recommendations

Optimize Critical Resource Chain

Medium Impact+2 points estimated

Why It Matters:

Your main.js file creates a dependency chain that extends page load time by 323ms, potentially delaying interactivity.

How to Fix:

Inline critical JavaScript directly in the HTML for immediate execution. Move non-critical functionality from main.js to separate files that can load asynchronously. Use async or defer attributes for non-blocking script execution.

Implement Resource Hints Strategically

Low Impact+1 point estimated

Why It Matters:

Missing preconnect hints force the browser to establish connections during resource loading rather than proactively, adding unnecessary latency.

How to Fix:

Add <link rel='preconnect' href='https://www.googletagmanager.com'> to your HTML head for Google Analytics. Monitor your site for other third-party domains and add preconnect hints for frequently used external resources. Limit to 4 preconnect hints maximum to avoid performance degradation.

Want to Analyze YOUR Website?

Get AI-powered performance insights with actionable fixes in 30 seconds

More Generic Speed Tests

Generic Performance Resources

Frequently Asked Questions

Keep Your Site Fast After Optimization

Once your site is optimized, maintain that speed. Use DeployHQ for zero-downtime, automated deployments—so performance fixes and updates go live safely every time, without breaking your site.

Explore DeployHQ →Trusted by engineering teams shipping high-performance sites