Yes, that is what it was built for. On the server it does nothing; in the browser it starts after hydration. See Server-side rendering.
Google Analytics also counts history changes by itself. Turn off Page changes based on browser history events in the enhanced measurement settings of the web stream, as in Getting started. With Tag Manager, also check that the index.html snippet is gone.
Google can take an hour or more to apply the change to the tag it serves, so the second page view may keep arriving for a while after you save. You can tell the two apart in the network tab: the package’s page view carries _ee=1, while the one from history events comes a few seconds later without it.
Yes. Put provideAnalytics() in the providers of the root module and add TrackEvent to the imports of the module that uses the directive.
Yes. The package uses no zone.js API, and a spec runs it in a zoneless app.
For automatic page views, yes: they follow the router’s navigations. Custom events work without it.
Install the Google Analytics Debugger extension in Chrome, or with Tag Manager open the container in Preview mode (Tag Assistant). Events then appear in Google Analytics › Admin › DebugView.
Yes, page_location is the full address, as Google’s own tag sends it. If addresses can contain personal data, such as an e-mail in a query parameter, keep it out of the address or remove it in the Google tag settings.
The package itself sets none. The Google tag sets the GA4 cookies, unless Consent Mode says analytics_storage: 'denied'.
Yes. Pass the choice to updateConsent(); any banner or consent tool that reports the visitor’s choice works. See Consent Mode.
With a nonce-based policy, give Angular the page’s nonce (ngCspNonce on the root element, or CSP_NONCE) and the Google tag script carries it, so script-src needs no Google host. See Strict Content Security Policy. With a host-based policy, allow https://www.googletagmanager.com in script-src. Either way, allow the Google Analytics hosts in connect-src and img-src.
Not right away: 2.x keeps working and gets security fixes until 30 April 2027, with no new features and no new Angular versions. Version 3 keeps what 2.x did and brings Tag Manager without a snippet, Consent Mode, SSR safety and the MIT licence. See Moving from 2.x.