How to deploy a script to all pages on SharePoint Online

Copper Contributor

Our organization uses a third-party software for analyzing our intranet sites on SharePoint Online. This software uses a JavaScript code.


The code has been added manually to every pages by using the Modern Script Editor web part at this moment.


Is there way to deploy this code to all pages centrally on the tenant level?

1 Reply

Hi @T_Kujala ,

you can build an SPFx application customizer (an SPFx extension) and follow this approach used for Google Analytics.