revolunet / angular-google-analytics

Google Analytics tracking for your AngularJS apps
MIT License
652 stars 179 forks source link

Using both Universal Analytics and GA4 #235

Open georgiaessig opened 2 years ago

georgiaessig commented 2 years ago

I have an Angular site which uses google analytics (universal analytics) to track page views, etc. The way we add the tracker is by setting the account, e.g. AnalyticsProvider.setAccount({'tracker': 'UA-12345-1'}) We are trying to explore the same metrics we are currently collecting in the new GA4. We followed the instructions about adding multiple trackers and currently have the call: AnalyticsProvider.setAccount([ { tracker: 'UA-12345-1', name: "universal" }, { tracker: 'G-123456', name: "ga4" } ]); In the instructions it mentions that this works only for universal analytics, and it is likewise not sending the collected metrics to the GA4 page and only the Universal Analytics page.

Is there a way to set the tracking in a way to send our metrics to both the UA page and the GA4 page?

revolunet commented 2 years ago

Hi, no idea sorry

nishaskumar commented 1 year ago

I have an Angular site that uses google analytics (universal analytics) to track page views, etc. The way it added the tracker is by setting the account UA-XXXXX-X. Now want to use GA4, will changing the tracker id will transfer data, or need to use some other package?

aSydiK commented 1 year ago

@revolunet are there plans to support GA4?