Demo how to inject Google Analytics traffic tracking JavaScript to any Modern SharePoint Online site with SPFX . Full coding demo shows steps for coding, configuration, deployment, and testing. Modern page UI is tightly controlled by Microsoft to keep customers on the product roadmap. Using SPFX to inject Application Customizer is the recommended and supported method to Also feel free to download the complete SPPKG package, upload to App Catalog, and deploy to any SPO site collection on your tenant. Simply change the final PowerShell cmdlet (Add-PnPCustomAction) to have the correct Google Analytics Tracking ID for your GA Property. Cheers.