hooking to track the view of a post/page
-
I have a simple function to track the last viewed post/page by using the action add_action( ‘wp’,’myfunction’);
That seems to work good. However, it looks like either background processes or other processes view posts/pages of my website as well. Myfunction tells me when a post has been viewed and it seems that that is not only when I (or a user) view a post or page.Also tried the hooks loop_start and loop_end, but with the same effect: looks like there are ghost views at random times.
Does anyone has an idea what can be the matter, the cause or how to prevent/solve this?
Looking forward to any help.
hans
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘hooking to track the view of a post/page’ is closed to new replies.