Unassigned Traffic With Cookieless Setup


I’ve implemented the Cookieless tracking using the following guide: Cookieless GA4 tracking using server GTM - Stape.

However, I am getting a lot of Unassigned traffic in GA4. This includes visits where the URL had UTM parameters.

I left a comment on the blog post; I believe this is because of the session ID. I need clarification on what this value should be when I overwrite a session. I set this to Timestamp, but I noticed recently that the guide says the following:

“ga_session_id is a ga_session_id value from Firestore, previously set to timestamp in seconds.”

Please explain what the {{timestamp - milliseconds}} variable looks like so I can fix this ASAP.

Any other knowledge of what might cause the Unassigned traffic would be greatly appreciated.

i did that too and fixed it with a timestamp variable in server container instead. for the session id you need the timestamp in s. there are variables in the gallery where you can do that. so my transformation for a new user looks like this

And you aren’t receiving Unassigned traffic?

What variable are you using for ga_session_number? I see its name is 1 as a number.

Lastly, do you use the same variable for the overwrite session tag transformation and Firestore writer tag then?

There is a variable in the gallery called “Number & String operations” which can calculate.

I use the same yes, i made it a little bit other than stape and needed a while until it worked. the biggest problem was firestore write and read at the beginning


So, I’ve taken this into consideration and implemented the change mentioned. But I’m still receiving a large number of (not set) data. I’ve tried a few different tests such as changing the session_id into a string or putting it through a type changer variable to ensure it’s always a number. I am waiting to see the results of these tests. But if there’s anything else that could be causing this, I would appreciate the advice.

So, a quick update here. We discovered that most of the Unassigned traffic doesn’t have a first session date in GA4. What could be causing this? Does this mean my new user tag has an issue?

Update, I see now that most of my events aren’t sending the session_start events. Any input on this?

strange, i had the opposite of this … duplicated counts of session starts because the firestore lookup was too slow.

there could be many reasons for this. session start is only send when user is new or when he is inactive, so maybe there is a problem with the timestamp (or the lookup and so on). difficult without seeing anything, maybe you can share some screenshots of tag rules, transformations, the log and especially the values of the variables when user is new

Looking at this I believe my Unassigned issue is the same. It might be that the “active session” tag is firing faster than it’s retrieving the data from Firestore. It might be counting the second event as a different session, but because we remove the .ss parameter, it’s not sending the session start event.

Looking at this guide, the best way to resolve this might be for Stape to build a cookieless client that already has the Stape Store or Firebase tags incorporated: Cookieless GA4 with Server-Side GTM | Medium.

This way they can add a delay that will help ensure the data is processed before it’s sent to GA4.