scullyio / scully

The Static Site Generator for Angular apps
https://scully.io/
MIT License
2.55k stars 256 forks source link

GA4 (Google Analytics 4) with Scully? #1142

Open viztastic opened 3 years ago

viztastic commented 3 years ago

🧩 Feature request

I'm not sure if this is a feature or doc request, but is there any guidance on how to implement the new GA 4 with Scully? The documentation on GA4 seems sparse and I can't seem to get my Angular/scully app to fire off events so I know which page I'm on.

Is there any reference implementation for this?

Describe the solution you'd like

Would be amazing if there's a reference implementation or pointers on how to do this.

Describe alternatives you've considered

Tried some of these approaches: https://blog.brendansluke.com/posts/how-to-add-google-analytics-to-an-angular-9-web-app-

Seems overly simplistic and doesn't help you track beyond initial page view.

SanderElias commented 2 years ago

@viztastic Does the GA plugin we provide solve your issue?