Shopify stores get tracking installed one of two ways: a direct edit to theme.liquid, or Shopify's newer Custom Pixels feature. The theme.liquid route is faster for straightforward pageview tracking and is what most stores use.
No — editing theme.liquid only applies to Shopify's standard Liquid-based storefronts. On a Hydrogen (React-based, headless) storefront, add the script to your app's root layout component instead.
Not by default. Shopify's checkout runs on a separate, more locked-down domain, and injecting scripts there generally requires Shopify Plus's checkout customization tools or a Web Pixels app extension, not a theme.liquid edit.
The script uses defer, so it loads in parallel with the rest of the page rather than blocking it, and the file itself is small — the effect on Shopify's storefront speed metrics is minimal.
Yes, if you install a new theme version rather than editing your current one in place, you'll need to re-add the script tag to that theme's theme.liquid file.