I've searched online for a way to disable post/page view "hacking" with refreshing page but I didn't find any.
How to not increase page/post view count with refresh?
or same question from different angle:
How to register only unique visits?
My current thoughts are IP
or nonce
but Im afraid I need a little help to get started.
Current code is super simple:
/* Allow devs to override the meta key used. By default, this is 'Views'. */
$meta_key = 'estate_property_views_count';
/* Get the number of views the post currently has. */
$old_views = get_post_meta( $post_id, $meta_key, true );
/* Add +1 to the number of current views. */
$new_views = absint( $old_views ) + 1;
/* Update the view count with the new view count. */
update_post_meta( $post_id, $meta_key, $new_views, $old_views );