Hi @tango15mk,
we are extremely sorry for the delayed response.
Yes, there are hooks that you can use to perform tasks after email verification and when user logs in. In order to track an event when a user verifies their account via email, you can use the action hook ‘user_registration_check_token_complete’ as following:
add_action( 'user_registration_check_token_complete', 'ur_track_user_email_confirmation', 10, 2 );
function ur_track_user_email_confirmation( $user_id, $user_reg_successful ) {
// $user_reg_successful is either true or false. If it is false then the user's
email is not verified yet.
if( $user_reg_successful === true ) {
//Use your code here to track event
}
}
In order to track an event when a user logs in, you can use the filter ‘user_registration_login_redirect’ as following:
add_filter( 'user_registration_login_redirect', 'ur_track_user_login_session', 10, 2 );
function ur_track_user_login_session( $redirect, $user ) {
// Use your code here to track event
// The $redirect parameter expects an url to be returned by this filter.
return $redirect;
}
We are hopeful that this helps to meet your requirements. If you have any further queries, do let us know, and we will get back to you.
Regards,
WPEverest Support Team