1. Home
  2. Docs
  3. GA4Admin
  4. Functionalities
  5. Admin Login and Logout Tracking

Admin Login and Logout Tracking

The GA4Admin plugin for WordPress allows you to monitor and record admin user login and logout events on your website. Tracking these events is crucial for security and auditing purposes, as well as gaining insights into admin activity. Below are the key events tracked by the plugin related to admin login and logout:

Event Name: ga4admin_user_logged_in

  • Trigger: This event is triggered when an admin user logs in to the WordPress admin panel.
  • Event Parameters:
    • ga4admin_action: Same as event name.
    • ga4admin_domain: The domain of the website.
    • userType: The user’s role(s).
    • user_id: The user’s ID.
    • username: The user’s username.
    • user_login: The login username of the admin user.
    • login_time: The timestamp when the admin user logged in.

Event Name: ga4admin_user_logged_out

  • Trigger: This event is triggered when an admin user logs out of the WordPress admin panel.
  • Event Parameters:
    • ga4admin_action: Same as event name.
    • ga4admin_domain: The domain of the website.
    • userType: The user’s role(s).
    • user_id: The user’s ID.
    • username: The user’s username.
    • user_login: The login username of the admin user.
    • logout_time: The timestamp when the admin user logged out.

(Please note: userType, user_id, and username are the universal parameters sent with every event).

Monitoring admin login and logout events is essential for enhancing website security and keeping track of admin activities. With these events and their associated parameters, you can maintain an audit trail of admin logins and logouts, helping you identify and respond to any unusual or unauthorized access to your WordPress admin panel.

How can we help?