Google Analytics UserID not working... help

Hello Bubblers,

I am trying to identify logged users in my Google Analytics. I´m Using Google Tag Manager in HTML Header, but it´s not working…

I made a data layer and created a login event, the function login in data layer is working at GTM, but UserID still not working and I don´t know why…

What am I doing wrong?

Try instead to put the <script… code here - found within settings (not at the page level)

1 Like

But how to edit function “Current user’s user_unique_code” to the “SEO/metatags”?

Not quite sure what you mean? Do you mean how to invoke the gtag.js javascript function to set the userid? If you do, you probably want that in an on-page load workflow, or on login workflow.

Full disclosure - I created a commercial plugin to deal with all this fiddly google javascript stuff. https://bubble.io/plugin/google-analytics-4-single-page-apps-1617143385310x480056316420948000

You could look at that and the videos if you wanted to figure out how to do in with javascript. There is a part explaining how to set the GA4 userid with the Bubble User Unique Id. Or buy my plugin :slight_smile:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.