There is some custom google analytics events I've specified for my application. Trigering these events is sometimes not very easy.
For example: User is redirected to home page after purchase and I have to forward some data that this home page is displayed after purchase to push something to _gaq
based on that.
Is there any way to trigger google analytics from backend e.g. in a controller without taking care if the action is ajax request or plain request and response has redirect or Ok status?
Introduction. The Google Analytics Reporting API v4 provides programmatic methods to access report data in Google Analytics (Universal Analytics properties only). With the Google Analytics Reporting API, you can: Build custom dashboards to display Google Analytics data.
The answer is simple: No, Google Analytics filters do not apply retroactively. They only apply to data gathered after the filter is applied.
To trigger Google Analytics from the backend you should use: Measurement Protocol.
That is part of the Analytics Collection:
Web Tracking (ga.js) Measure user interaction with websites or web applications.
Android Measure user interaction with Android applications.
iOS Measure user interaction with iOS applications.
Measurement Protocol Measure user interaction in any environment with this low-level protocol.
At the moment it is available as dev preview. To signing up simply request access to the beta.
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