Jump to content

How to track Member logins with GA4

Recommended Posts


I am trying to track member logins in GA4. I have all other tracking set up except member logins. Here is javascript code for this:

  'userId': {{ member_id }}

I need to get and pass the member ID.

1) How can I get the Member ID upon login using javascript?

2) How can I get the Member ID when members access any page in the members' area?

Thank you,


Edited by mfd
Link to comment
  • Replies 1
  • Views 483
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.