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.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’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:- Your page begins loading its own HTML, CSS, images, and fonts as usual.
- Maestra’s SDK loads in parallel. It does not delay the first paint of your page.
- The SDK checks which campaigns apply to the current visitor and page based on targeting conditions.
- Only campaigns that match are rendered. If nothing matches, no additional content is loaded.
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.
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% |
Troubleshoot site speed performance
If you notice a change in your site speed after enabling Maestra or updating your campaigns, try the following:- 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. - Clean up unused campaigns
Deactivate or archive campaigns you no longer run. Even campaigns that don’t trigger add to what the browser evaluates. - Reserve space for above-the-fold widgets
If a Maestra widget or banner appears in the first viewport, add a placeholder with a fixed height in your site layout. Without it, surrounding content shifts when the widget loads — hurting your CLS (Cumulative Layout Shift) score. - 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. - Limit campaigns per page
Use targeting conditions to show only relevant campaigns on each page, rather than loading many and hiding most. Fewer campaigns per page means less for the browser to evaluate. - 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.
- Go to PageSpeed Insights and enter your domain.
- Look at “Discover what your real users are experiencing” — this is CrUX data from real visitors over the past 28 days.
- Monitor LCP (Largest Contentful Paint), INP (Interaction to Next Paint), and CLS (Cumulative Layout Shift).
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.