-
Converting a GA4 Event's float parameter to a STRING value for sending
Hey there! I’m having a little problem with Google Tag Manager’s GA4 Event’s User Properties, and I was wondering if you could help me out. I’m trying to send over the user’s client ID to GA4 – it’s usually a 20-digit number separated by a ‘.’.
The kicker is, when it reaches GA4, the Client ID parameter is read as a float number (courtesy of its format, something like ‘1.5437e+09’ you know), and it gets rounded up, or worse, loses a few digit at the end.
I tried adding a letter to the parameter, kind of like “S_{{client_id}}”, and it works alright. But it just doesn’t feel quite right, you get me? I want to find a cleaner way to do this. I even tried to convert the client ID specifically to string, using the JS .toString() method, but GA4 is still stuck on reading it as a float number.
So here’s my question for you – how can I set a parameter’s type on GTM to be sent over specifically as a STRING, no matter if it looks like a float number?
Log in to reply.