Skip to content
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

Server only tracking, user tracking? #73

Closed
manuelcoders opened this issue Oct 5, 2023 · 6 comments
Closed

Server only tracking, user tracking? #73

manuelcoders opened this issue Oct 5, 2023 · 6 comments
Labels
question Further information is requested

Comments

@manuelcoders
Copy link

I implemented tracking on a new property that tracks servers ONLY.

I see the pageviews correctly, but I don't see the users.
It's as if the events were not launched by users and therefore I can't understand their behavior, they all seem to be unconnected events.

I call the library and set setClientId to a unique value for each user.

Am I doing something wrong or is it not possible to have the concept of user by tracking only servers?

@aawnu
Copy link
Owner

aawnu commented Oct 5, 2023

Not sure if what you're asking is the part covered by the "dataflow" section in the Readme. Please let me know.

@manuelcoders
Copy link
Author

Hi aawnu, yes I read the README but I didn't understand if it works by just doing a server tracing. I don't do anything with "gtag.js". Probably without using gtag on GA4 then some information is missing to correctly create the user session, right?

@aawnu
Copy link
Owner

aawnu commented Oct 17, 2023

Sorry! Never got back to you.

GTAG.js will send the "first visit" action that starts a session. You should still be able to track everything, but I am not sure how well/accurate of a session you will get if using custom ids.

@manuelcoders
Copy link
Author

Hi aawnu, thanks for the reply!

Shouldn't 'first visit' be called only and exclusively the first time a user browses the site? I'm having a bit of trouble managing this server side thing...

Are you saying that I should also send session_start for subsequent sessions?
Do you know anyone who has tried to do full server tracking with GA4?

@aawnu
Copy link
Owner

aawnu commented Oct 17, 2023

I am not sure it is entirely possible to run a fully server-side experience as some features are hidden inside the GTAG.js. Server side is meant for events attached to a session, not the session it self.

Full server-to-server
While it's possible to send events to Google Analytics solely with measurement protocol, only partial reporting may be available. The purpose of measurement protocol is to augment existing events collected using gtag, GTM, or Firebase. Some event and parameter names are reserved for use through automatic collection and cannot be sent through the measurement protocol.
https://developers.google.com/analytics/devguides/collection/protocol/ga4

@manuelcoders
Copy link
Author

Thanks aawnu, I'll try playing with the sessions so I'll see if anything happens. Otherwise I'll try to create custom reports using bigquery/datastudio :)

@aawnu aawnu added the question Further information is requested label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants