Skip to main content

Overview

Performance is critical for modern websites. This guide helps you optimize your Tag Insight implementation to ensure minimal impact on page load times and user experience while maintaining comprehensive tracking coverage.
Tag Insight is designed to be lightweight, but proper implementation and configuration can further reduce any performance impact.

Performance Impact Analysis

Understanding the Load

Tag Insight’s typical performance profile:

Script Size

~50-200KB (gzipped: ~15-60KB)

Load Time

<100ms on fast connections

Memory Usage

~2-5MB in browser memory

CPU Impact

<1% during normal operation

Measuring Impact

Loading Strategies

Asynchronous Loading

Always load Tag Insight asynchronously:

Priority Loading

Control when Tag Insight loads:

Data Collection Optimization

Smart Sampling

Reduce data volume intelligently:

Event Batching

Reduce network requests:

Selective Tracking

Track only what matters:

Memory Management

Limit Event Buffer

Prevent memory buildup:

Data Structure Optimization

Minimize memory footprint:

Network Optimization

CDN Configuration

Optimize delivery:

Request Optimization

Minimize network impact:

Browser Optimization

Web Workers

Offload processing:

Lazy Loading Components

Load features on demand:

Performance Monitoring

Real User Monitoring

Track actual impact:

Performance API Integration

Use browser Performance API:

Best practices by Site Type

High-Traffic Sites

Performance Checklist

Loading
  • Async/defer script loading
  • Load after critical resources
  • Use resource hints (preconnect)
Data Collection
  • Implement sampling
  • Enable batching
  • Exclude unnecessary events
Memory
  • Limit event buffer
  • Clear old data
  • Optimize payloads
Network
  • Use nearest CDN
  • Enable compression
  • Implement retry logic
Monitoring
  • Track performance metrics
  • Set performance budgets
  • Monitor real user impact

Troubleshooting Performance

  1. Check script loading method
  2. Verify CDN response time
  3. Review sampling configuration
  4. Consider deferred loading
  1. Check event buffer size
  2. Review SPA configuration
  3. Enable aggressive cleanup
  4. Limit stored events
  1. Increase batch size
  2. Extend batch timeout
  3. Implement sampling
  4. Use beacon API

Next steps

Collaboration

Share performance tips

Monitoring Setup

Configure performance monitoring

Debugging Guide

Debug performance issues

Multi-Environment

Optimize per environment