GA4 weird session data

we switched from GTM to zaraz and for the most part everything is working fine, but our GA4 sessions seem to be pretty broken. for example one of our employees in martinque is browsing the site, but we are seeing 3 sessions instead of 1. does anybody know how to fix this?
10 Replies
Matthias
MatthiasOP14mo ago
@yo'av It seems like every pageview event starts a new session in GA4, without ending the previous session. So we are accumulating quite a few session. We are using SPA navigation and it seems to be working as expected in the Zaraz debug window.
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
Matthias
MatthiasOP14mo ago
Cloudflare domain or website?
Matthias
MatthiasOP14mo ago
croit
Ceph and DAOS storage solutions from croit: Benefit from the world's fastest and most cost-effective data storage solution.
Matthias
MatthiasOP14mo ago
But zaraz is running on cloudflare.croit.de
Matthias
MatthiasOP14mo ago
so this is a single visit to our homepage (as can seen by the single page_view) but there have been 3 session_starts/first_visits
No description
Matthias
MatthiasOP14mo ago
this is kinda urgent because my marketing guy is demanding we switch off of zaraz (which I really want to avoid)
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
Matthias
MatthiasOP14mo ago
yeah no worries, we'll just switch back to GTM
Bernd
Bernd2w ago
Although this is quite late, just wanted to chime in and say that we saw the same issue. What seems to happen is that Zaraz detects that the previous session has expired, and then start a new one. But saving that new session id doesn't work. This means that a new session is started on all captured events - including engagement measurements fired when the page/tab comes in and out of focus. The cause seems to be that the collection endpoint does not return a cookie. We have seen this behaviour when running zaraz on a subdomain via i.js instead of doing injection.

Did you find this page helpful?