DavidWells / analytics

Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
https://getanalytics.io
MIT License
2.38k stars 240 forks source link

Plugin Request - Server-side Implementation - Google Analytics #417

Closed matt-greatminds closed 4 months ago

matt-greatminds commented 5 months ago

The current Google Analytics plugin does not support server-side eventing and I'd like to request that enhancement.

My company already uses GetAnalytics for the front-end and would like to use the same library to fire events from the server for important business metrics that cannot be reliably captured from the browser.

Here is link from the Google Analytics Docs outlining server-to-server events.

@DavidWells

DavidWells commented 4 months ago

I started to build this over at https://github.com/DavidWells/google-tag-manager-serverless but put on the shelf for now.

GA keeps throttling their product lines and making sweeping breaking changes. Kind of hard to keep up with their "product direction"

It should be possible though as this lib runs in node.js

I moved this to https://github.com/DavidWells/analytics/issues/153

matt-greatminds commented 4 months ago

@DavidWells Thanks for the links. After reviewing them I noticed that the solution you were exploring was related to GTM instead of GA4.

What we are hoping for is to send events directly from our backend for things like, "user assessment record was created in assessment table of blah blah blah database". This will allow us to not have client code sending events for certain actions because the more reliable server event has that covered.

I was hoping that by using the Measurement Protocol would be a way to add server-side support for GA4.

Does the additional detail provided above, change your approach to this ticket?

ianlotinsky-gm commented 4 months ago

@DavidWells Please see your email inbox for a message from Matt about our interest in paying for this GA4 native integration. Thanks!