> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Page speed optimization

> Improve loading speed for your HoopAI funnels and websites to boost conversions and search rankings.

Page speed directly impacts conversion rates and search engine rankings. Studies show that a one-second delay in load time can reduce conversions by 7%. The HoopAI platform includes several built-in optimizations, and there are additional steps you can take to ensure your pages load as fast as possible.

## Common speed issues

| Issue                        | Impact                      | Solution                                          |
| ---------------------------- | --------------------------- | ------------------------------------------------- |
| Large uncompressed images    | Slow initial load           | Compress images before uploading; use WebP format |
| Too many third-party scripts | Render blocking             | Remove unused scripts; defer non-essential ones   |
| Unoptimized custom code      | JavaScript execution delay  | Minimize custom code; use async loading           |
| Excessive fonts              | Additional network requests | Limit to two font families maximum                |
| Too many page sections       | Large DOM size              | Consolidate sections; remove unused elements      |

## Built-in platform optimizations

The HoopAI platform includes several automatic optimizations:

* **CDN delivery** — all pages and assets are served through a global content delivery network for fast loading worldwide
* **Automatic image optimization** — uploaded images are compressed and served in optimized formats
* **Minified CSS and JavaScript** — platform code is minified automatically
* **Browser caching** — static assets are cached in the visitor's browser for faster return visits
* **Lazy loading** — when enabled, images and videos below the fold load only when the visitor scrolls to them

## Image optimization

Images are typically the largest assets on a page. Optimize them before uploading:

<Steps>
  <Step title="Resize before uploading">
    Resize images to the maximum display size needed. A hero image rarely needs to be larger than 1920 x 1080 pixels.
  </Step>

  <Step title="Compress the file">
    Use tools like TinyPNG, Squoosh, or ImageOptim to compress images without visible quality loss. Aim for under 200 KB per image.
  </Step>

  <Step title="Use WebP format">
    WebP images are 25-35% smaller than JPEG or PNG at equivalent quality. Most modern browsers support WebP.
  </Step>

  <Step title="Add alt text">
    Alt text does not affect speed, but it improves accessibility and SEO — always include it.
  </Step>
</Steps>

## Script management

<Steps>
  <Step title="Audit your tracking scripts">
    Review all scripts in the funnel's **Tracking Code** settings. Remove any scripts you no longer use.
  </Step>

  <Step title="Enable Optimize JavaScript">
    In the funnel's **Settings** tab, enable **Optimize JavaScript**. This lazy-loads custom HTML and JavaScript elements to improve initial page load.
  </Step>

  <Step title="Defer non-critical scripts">
    Add the `defer` or `async` attribute to scripts that do not need to load before the page content appears.
  </Step>
</Steps>

<Warning>
  Enabling **Optimize JavaScript** may delay some scripts from firing until the user interacts with the page. Disable it if your scripts (such as chat widgets or analytics) must run immediately on page load.
</Warning>

## Measuring page speed

Use Google Lighthouse to measure your page performance:

1. Open your published page in Google Chrome.
2. Press **F12** to open Developer Tools.
3. Click the **Lighthouse** tab.
4. Select **Performance** and click **Analyze page load**.
5. Review the performance score and recommendations.

Key metrics to monitor:

| Metric                             | Target                 |
| ---------------------------------- | ---------------------- |
| **Largest Contentful Paint (LCP)** | Under 2.5 seconds      |
| **First Input Delay (FID)**        | Under 100 milliseconds |
| **Cumulative Layout Shift (CLS)**  | Under 0.1              |
| **Total Blocking Time (TBT)**      | Under 200 milliseconds |

## GDPR-compliant fonts

Enable **GDPR Compliant Fonts** in the funnel settings to self-host Google Fonts instead of loading them from Google's servers. This eliminates a network request to Google and can improve both speed and privacy compliance.

<Tip>
  Run a Lighthouse audit before and after making optimization changes to measure the actual impact. Focus on the largest bottlenecks first — usually images and third-party scripts.
</Tip>
