When should a Shopify app script load on interaction?
Load an app module on interaction when it is not needed for the initial view and the user action can safely trigger it, reducing startup JavaScript and main-thread work.
Start with the likely cause
Use the gap between TTFB, FCP, LCP, CLS, and INP to narrow the problem before changing code. Keep the template, device, and network conditions consistent.
Change one thing on a theme copy
Isolate the suspected image, Liquid, CSS, JavaScript, app, or extension cost. A single controlled change makes the result easier to interpret and reverse.
Verify the whole journey
Repeat the measurement, then test navigation, product selection, cart updates, and checkout handoff. A faster metric is not a win if the storefront task breaks.
Source
Shopify developer documentation, accessed September 21, 2026.
Frequently asked questions
- What should be measured?
- Use the metric tied to the suspected cause, then verify the complete task.
- Where should the change be tested?
- On a theme copy with repeated conditions.
- When is the work complete?
- After the live journey and the repeated measurement pass.