Skip to content

Performance

Grona adds work to every page view that carries the snippet: requests to its CDN and API, and a short wait while the page is hidden. This page describes what happens on each page view, so you can judge the cost on your own site and keep it low.

Step When What it costs
antiflicker.js Every page view A synchronous request at the top of <head>. It blocks parsing until it arrives.
Page hidden Every page view, until main.js runs <body> is hidden until main.js has run, and on campaign pages until the changes are applied. At most 5 seconds after antiflicker.js has run. Bots are never hidden.
main.js Every page view An asynchronous request. The browser revalidates it on every page view; when nothing has changed, the CDN answers that the cached copy is current.
Changes file When a visitor is enrolled in a campaign One request to the CDN for that variation’s changes. Each file is cached by the browser for the long term.
Event batches During and at the end of the page view Tracking events to api.grona.ai, sent in batches, and with sendBeacon when the page is hidden or closed.

Visitor location comes from the CDN’s response headers, so it adds no request.

main.js is built for your workspace. It holds your active campaigns and only the optional parts of the runtime that your campaigns use. It grows as you add campaigns and use more targeting features, and shrinks when you end campaigns. Ending campaigns you no longer need keeps it small.

  • Keep the preconnect line. It opens the connection to cdn.grona.ai before the scripts are requested.
  • Place the snippet at the top of <head>, above other scripts, so main.js starts downloading as early as possible.
  • Do not route it through a tag manager or a delay plugin. That delays main.js and defeats the anti-flicker script. See Prevent flicker.
  • Consider leaving out the anti-flicker line on sites where visible flicker is acceptable. Then nothing on the page waits for Grona.

Ad and content blockers, firewalls and proxies can block Grona’s hosts. What visitors see depends on what is blocked:

Blocked Effect
cdn.grona.ai Neither script loads. Nothing is hidden, the visitor sees your original page, and nothing is counted.
main.js only, for example by a path filter The page stays hidden until the 5-second timeout, then shows your original page.
api.grona.ai only Changes still apply, but nothing is counted.

Grona does not serve its scripts or API from your own domain, and does not offer a first-party proxy.

Lighthouse, PageSpeed Insights and GTmetrix are treated as bots. They see your page with nothing hidden and no variation applied, so their scores leave out Grona’s cost and effect. Measure with real-user monitoring instead, such as the Core Web Vitals your analytics or monitoring tool collects from visitors’ browsers. Compare those metrics before and after you install the snippet, and again when you add the anti-flicker line.