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

# How Maestra affects website loading speed?

Learn how Maestra's on-site JavaScript works, how it affects your page speed, and what you can do to minimize the impact. Site speed and SEO are important to our customers, and Maestra is committed to minimizing the footprint of our on-site code.

## How Maestra's JavaScript works

Maestra's on-site SDK is the script installed on your website that powers pop-ups, embedded blocks, product recommendations, and visitor tracking. It needs to be present on your site for any Maestra personalization campaigns to display.

The SDK loads **asynchronously**. This means it does not block your page from rendering — your content, images, and layout load as normal while Maestra's script loads in the background.

Here's what happens on each page load:

1. Your page begins loading its own HTML, CSS, images, and fonts as usual.
2. Maestra's SDK loads in parallel. It does not delay the first paint of your page.
3. The SDK checks which campaigns apply to the current visitor and page based on targeting conditions.
4. Only campaigns that match are rendered. If nothing matches, no additional content is loaded.

<Note>
  Because the script loads asynchronously, it does not affect when visitors first see your page. It can affect when the page becomes fully interactive (Time-to-Interactive), since the browser needs to finish executing all JavaScript — including Maestra's — before the page is fully responsive.
</Note>

## What affects the size of Maestra's footprint

**Base SDK size:** Under 100 KB. This is the core script loaded on every page.

**Campaign payloads load conditionally.** The SDK evaluates targeting conditions first and only fetches HTML and assets for campaigns that match. Pages with no matching campaigns load only the base SDK.

**The main cost driver is custom HTML markup — not campaign count.** Maestra loads the standard template once. Each campaign carries only its own configuration (content, targeting, timing). This is lightweight. However, when campaigns use fully customized HTML overrides instead of style changes to the standard template, each one ships its own HTML payload. Across many campaigns, this adds up.

What we've seen in our benchmarks:

* A site with **68 campaigns on standard templates** added \~5–7% to mobile TTI — about the same as a site with only 21 campaigns.
* A site with **71 campaigns using custom HTML** added \~24% to mobile TTI, driven by the cumulative weight of per-campaign markup.

## How Maestra compares to other platform combinations

Most merchants don't use a single marketing tool — they combine separate platforms for email, reviews, recommendations, and forms. We benchmarked Maestra against real sites running common multi-platform stacks using Lighthouse v12 under identical conditions:

| Setup                                        | Total script weight | Mobile TTI impact |
| -------------------------------------------- | ------------------- | ----------------- |
| Maestra, standard templates                  | \~200–300 KB        | \~5–7%            |
| Maestra, heavy customization                 | \~1 MB+             | \~20–24%          |
| Email platform + reviews/recs tool (typical) | \~500–750 KB        | \~18%             |
| Lean two-platform setup                      | \~115 KB            | \<1%              |

Maestra Platform replaces several separate tools with a single platform. With standard templates, it performs in the same range or better than the multi-tool stacks it replaces.

## Troubleshoot site speed performance

If you notice a change in your site speed after enabling Maestra or updating your campaigns, try the following:

1. **Switch to standard templates**\
   This is the single most effective change. Custom HTML overrides are the largest contributor to payload size. When a campaign needs a custom look, prefer adjusting the standard template's styles and content over rebuilding the markup. The standard template loads once; custom HTML loads per campaign.\\
2. **Clean up unused campaigns**\
   Pause campaigns you no longer run. \\
3. **Reserve space for above-the-fold widgets**\
   If a Maestra widget or banner appears in the first viewport and shows to all visitors, add a fixed-height placeholder to prevent content shifts that hurt your CLS score. Skip the placeholder if the widget only shows to a subset of your audience — an empty reserved space will hurt your CLS more than the shift itself.\\
4. **Optimize campaign assets**\
   Lightweight image formats (WebP, optimized PNG) load near-instantly inside Maestra widgets. Large videos, GIFs, or uncompressed images cause noticeable delays, especially on mobile. Compress images, use WebP where possible, and avoid auto-playing video in pop-ups unless you've tested the impact.\\
5. **Remove unused third-party scripts.**
   Sites accumulate scripts over time — and not all of them are still needed. Unused scripts slow down your site and clutter your console. Do a quick audit and remove anything you're no longer actively using.\\
6. **Check your real-world performance**\
   Lighthouse and PageSpeed Insights are synthetic benchmarks — they simulate constrained devices. What matters for your visitors (and for Google's rankings) is real-user data.

To check your Core Web Vitals:

1. Go to [PageSpeed Insights](https://pagespeed.web.dev/) and enter your domain.
2. Look at **"Discover what your real users are experiencing"** — this is CrUX data from real visitors over the past 28 days.
3. Monitor **LCP** (Largest Contentful Paint), **INP** (Interaction to Next Paint), and **CLS** (Cumulative Layout Shift).

You can also see this data in **Google Search Console → Core Web Vitals**.

Track the trend over time. If numbers change after updating your Maestra configuration or storefront, investigate.

## About our benchmarks

The numbers in this article come from Lighthouse v12 measurements on 6 real merchant sites under controlled conditions:

* **Mobile:** 4× CPU throttle, 1.6 Mbps, 150 ms RTT.
* **Desktop:** No CPU throttle, 10 Mbps, 40 ms RTT.
* 10 runs per condition (platform enabled vs. fully blocked), interleaved, fresh browser profile each run.
* Statistical significance: Welch's t-test, p \< 0.05.

Lighthouse simulates constrained hardware. Real users on modern devices will typically see less impact. Every site is different — your results will vary depending on your existing code, hosting, and configuration.
