My application is a conference planning SaaS platform. The front end is written in angular 15. We have google analytics at the global level (index.html) and it works great. All the page views are tracked and analyzed as they should be.
Our customers are able to create a “microsite” for their particular conference and host it under our main application website. And we have had the feature request for them to be able to put their own google analytics tracking code on that microsite.
The question is, how can I load another google analytics script and only make that available for a single component and its child components. Is this possible? The entire “microsite” is wrapped in a single component with a <router-outlet>
and many child pages.
Is it as simple as just loading the google script in that container component?