Do you know which hook would be the most appropriate in this case?
Hook to see page view? You can use with init and check if you in is_single() or is_page()..
Thanks for your help. It works also with wp as a hook.
My only problem remains that the post view record is stored in the database, but it does not appear in the activity log in the dashboard. I guess this is a similar problem to the one posted in another topic in this forum a month ago.
Can you print here your code?
This is the line from the database:
‘4556’, ‘guest’, ‘read’, ‘WP’, ‘post’, ‘dev test’, ‘422’, ‘0’, ‘127.0.0.1’, ‘1440692748’
Would user_id be the problem?
Hmm.. Please show me your PHP code to store that.
I had wrong object_type, that was the reason for not showing the record in the dashboard, I guess. It works fine now. Thanks again for the help.