Skip to main content

How the Analysis script runs

Analysis uses an additional browser module that is loaded by the existing Lyftio project snippet. You do not need to install a separate script.

When Analysis runs​

The Analysis module runs on normal website visits when:

  • Analysis is enabled for the project.
  • The Lyftio project snippet is installed on the page.
  • Any analytics consent required by the project's consent mode has been granted.

It is not loaded for recognized bots or while the Visual Editor or Preview is open.

If the project does not require consent, the module is loaded after the page body is available. If consent is required, Lyftio waits until consent is received before loading it. Activity that occurred before consent is not stored and sent later.

Disabling Analysis prevents the additional module from loading on subsequent page loads.

How it loads​

The project snippet receives the project's Analysis configuration and then adds the Analysis module to the page asynchronously. Once loaded, the module starts collecting the enabled visit, navigation, interaction, error, and performance signals.

On a traditional multi-page website, the module starts again on each page load. On a single-page application, it remains active and can follow navigation between page paths without requiring a complete reload.

Some supplemental analysis features are delayed until the main page content has loaded or the browser has idle time. Enhanced tracking is also limited to the configured sample of visitors.

Effect on website performance​

Running Analysis requires an additional script download and a small amount of browser processing, memory, and network activity. As with any analytics tool, this means the performance impact cannot be exactly zero and can vary depending on the page, device, and visitor activity.

Lyftio is designed to reduce this impact:

  • The module loads asynchronously and does not block the browser from parsing the page.
  • Supplemental work is scheduled after the main content has loaded or while the browser is idle.
  • More detailed tracking can be sampled instead of running for every visitor.
  • Collected events are grouped and sent in batches rather than creating a request for every interaction.
  • When a visitor leaves or hides the page, supported browsers can send pending data without delaying navigation.

For websites with strict performance budgets, test representative pages and devices before and after enabling Analysis. Monitor both laboratory tests and real visitor metrics, because the effect can differ between fast desktop devices and slower mobile devices.

See Data collected by Analysis for an overview of the information the module collects.