theiconic / php-ga-measurement-protocol

Send data to Google Analytics from the server using PHP. Implements GA measurement protocol.
MIT License
655 stars 136 forks source link

How to control session duration? #87

Open dinhkhanh opened 4 years ago

dinhkhanh commented 4 years ago

I've been testing and see the session usually is 4 minutes long even if I close the page (that send the hit) or not.

I'd like to know if it is possible to set the session duration of a particular pageview hit?

If not possible, why all session is around 4 minutes long (I check on Google Analytics Realtime and Behavior report in the end of the day). May we change 4 to x minutes instead?

Screen Shot 2020-06-20 at 10 37 53
alberto-bottarini commented 3 years ago

GA session last, as default, 30 mins. You can change it in your GA admin dashboard.

https://support.google.com/analytics/answer/2731565?hl=en