Can I submit Google Analytics event in Node.js/Express? Is there any SDK for that?
I'd like to do something similar to: Event Tracking
Analytics collection can take place on both the client and server side. Google Analytics provides easy to use APIs and SDKs to send data to Google Analytics. In addition to those, we have developed code that you can use in your App Engine applications to easily send server-side analytics to Google Analytics.
Node. js is a server-side JavaScript run-time environment. It's open-source, including Google's V8 engine, libuv for cross-platform compatibility, and a core library. Notably, Node.
Node. js is a JavaScript framework for writing server-side applications. In its simplest form it allows you to trigger small JavaScript programs from the command line without any browser involved. For example, assuming node is installed if you write a JavaScript program in a file called hello.
You're probably looking for universal-analytics which allows you to send Events much like ga
on the browser like so:
visitor.event("Event Category", "Event Action").send()
where visitor
is instantiated like so:
var visitor = ua('UA-XXXX-XX') // Your Google Analytics ID
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With