Learn business growth with Google Analytics 4 Forums Google Analytics 4 . How to restart GA4 as a new session after a certain event

  • . How to restart GA4 as a new session after a certain event

    Posted by Jack on 4 May 2022 at 2:22 pm

    Here’s a pickle for ya. I’m in the middle of a project where I need to keep an eye on some kiosk happenings. The thing is, the kiosk ain’t changing its webpage or browser, so the session id sticks around until it times out. I’m racking my brains out to find a way to kickstart a spanking new session after a specific event.

    I stumbled upon this sessionControl thing for UA, but I’ve scoured through GA4 and couldn’t find something similar. Big bummer, wouldn’t you say so?

    I even took a shot at plugging in ga('send', 'pageview', {'sessionControl': 'start'}); into custom HTML in GTM, but no dice. What gives, right?

    Oliver replied 11 months, 2 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • Zoe

    14 August 2022 at 9:17 pm

    The person is having trouble with some technical aspects of a project where they’re trying to monitor a kiosk’s actions. They want to start a new session after an event happens, but they’re having difficulty because the kiosk’s webpage or browser isn’t changing. They tried using a method they found for Universal Analytics, but they couldn’t find a similar method for Google Analytics 4. Additionally, they tried to manually start a new session through Google Tag Manager, but this approach didn’t work.

  • Oliver

    24 February 2023 at 7:09 pm

    Unfortunately, the ‘sessionControl’ function is not available in Google Analytics 4. In GA4, the session automatically times out after 30 minutes of no activity, or at midnight local time, and you cannot override or manipulate this. As for the ‘ga()’ command you tried, it belongs to the older Universal Analytics codebase and is not compatible with GA4. You might want to consider a workaround like changing some user-scoped custom dimension on each ‘special’ event. It would start a new user, and as a result, a new session in GA4. However, keep in mind that this workaround might have other implications on your data and should be tested carefully.

Log in to reply.