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.
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?
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.
Do you know which hook would be the most appropriate in this case?