Google Analytics User Tracking

Hello, could someone please explain how I can track users and how much time they spend on my app using Google Analytics?

Currently I can see how many users are currently on the app, but cannot see who exactly is the user.

Thanks in advance.

I added mixpanel, you can send custom data including the action, a form of ID for a user and any other data you want to send. It’s pretty nimble.

I’ve only ever used GA for more generic data, like source, search, sessions, etc. I don’t know how good it is for more granular work, without investing significantly into their way of thinking (which I’m not a fan of, it’s very Google of them).

Hey @anita25! To track which users are on your Bubble app and how long they stay, you need to send a User ID from Bubble to Google Analytics, because Bubble doesn’t do this by default. First, enable the User-ID feature inside GA4. Then, right after a user logs in, run a small JavaScript snippet that sends their Bubble “Current User’s Unique ID” to GA using gtag('set', { user_id: 'dynamic ID here' }). GA won’t show the person’s name or email, but it will let you identify sessions by the ID you send. GA4 already tracks session duration automatically, and if you ever need more detailed timing, you can trigger your own custom events from Bubble.

Can you please explain how to enable the USER id in GA4?