-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Real-time from server-side? #104
Comments
I'm currently facing the same issue trying to post data from the server to avoid ad-blockers. Did you have any luck solving this @tashburn ? EDIT: The event data is displayed in the report the day after, they just do not show up in the real time view. But somehow only the events label shows up, the category and action do not... EDIT2: Using postman putting the data in the body as plain text also works and the event is displayed in the real-time view. |
Could either of you post the exact call of the module for tracking the events that do not show up in Google Analytic's real-time reports? |
I also encountered this issue. Steps to reprodue// ga-test.js
const ua = require('universal-analytics');
const visitor = ua('<My UA ID>');
visitor
.event({
ec: 'Fake',
ea: 'Fake action',
})
.send();
ExpectedAfter some short delay (< 20s), a event shows up in real time report (under Reports > Real-time > Events) ActualNo events shown in the real time report on google anaytics. Other observationsWhen
It looks totally legit. |
Hi, I found that if I send the action along with screenview, then it will show up. Maybe pageview will have the same effect. Reproduce: const ua = require('universal-analytics');
const visitor = ua('<UA ID>');
visitor.screenview({
screenName: 'FakeScreen',
applicationName: 'Fake app',
});
visitor
.event({
ec: 'Fake',
ea: 'Fake action',
})
.send();
Then you should see the pageview & event coming to the report. |
I haven't had any issue using this from the server side the following way: const visitor = ua(this.googleAnalyticsTrackingId, this.sessionId, {
uid: this.deviceId,
});
visitor.event(
this.getGoogleAnalyticsCategory(),
this.getGoogleAnalyticsAction(),
this.getGoogleAnalyticsLabel(),
this.getGoogleAnalyticsValue(),
this.getGoogleAnalyticsPath(),
(err) => {
if (err) {
this.logger.error(JSON.stringify(err, null, 2), 'sendGoogleAnalyticsStatistics');
Raven.captureMessage(err, { level: 'error' });
}
},
); Maybe it doesn't behave correctly using the |
Same here, no real-time data.
|
I'm starting to use
universal-analytics
exclusively on the server-side. My browser clients send custom events to my servers, and my servers then post events to google analytics usinguniversal-analytics
.I'd love to somehow accomplish GA's "real-time" abilities with my setup, where I know real-time info about clients. Can this be done with
universal-analytics
from the server-side?If
universal-analytics
is already capable and I missed it in the documentation, please let me know how to do it.The text was updated successfully, but these errors were encountered: