Support Forum › Support Forum › User Activity Tracking and Log › Password protected website tracks the user 2 times
- AuthorPosts
- August 31, 2023 @ 2:19 am
Hello I was wondering if there is a way to track the user only after placing the password protected, because the tracker is showing the first load that is the password page and the load of the page.
Moove Agency
September 01, 2023 @ 7:39 amHello,
Thanks for using our plugins.
We created a new code snippet for the default WordPress password protection.
If you add the below code to your functions.php file, the plugin will not track the password protected posts until the user types the correct password.
If you are using different password protection feature, your developers will need to adjust the snippet.
add_action('moove_uat_filter_data', 'activity_check_password_protection', 10, 1); function activity_check_password_protection( $data_to_insert ) { if ( isset( $data_to_insert['post_id'] ) && intval( $data_to_insert['post_id'] ) ) : if( post_password_required( $data_to_insert['post_id'] ) ) : $data_to_insert = false; endif; endif; return $data_to_insert; }
Hope this helps.
- AuthorPosts
The topic ‘Password protected website tracks the user 2 times’ is closed to new replies.