-
How to create a user ID for GA4 to BigQuery
What I’m trying to do
Yo guys, I’ve got a fun challenge here. I’m trying to figure out how to create a
user_id
in GA4 that’s hooked up to BigQuery.Here’s my strategy so far
So I’ve been getting into the trenches and following this online guide:
-
I’ve been harnessing GTM to bring out the best of GA4.
-
The links are in place between GA4 and BigQuery.
(So far, so good. Got data from my site, and it’s pooling into BigQuery.)
-
Undertook a mission to pass
user_id
todataLayer
:-
Injected the code below into
HEADER
, my buddy who hangs out abovegtm.js
. -
I might be overthinking this, but I’m not sure if using a string (
USER_ID
) at this stage could botch up the results.
<script> dataLayer.push({ 'user_id': 'USER_ID' }); </script>
-
-
Create a variable of dataLayer:
-
Tuning up the GTM code:
Expected vs What happened
-
I dreamt of building a comparison such as this:
But life had other plans:
-
Also, hoped my buddies at BigQuery would score me a new column
user_id
… still waiting.
What’s up?
- Am I tripping over something in the process or maybe missed a step?
- Is it possible to have the
user_id
passed from the front-end and back-end making its way to BigQuery as I had imagined?
Really appreciate your time in cracking this nut together!
-
Log in to reply.