lundi 5 octobre 2015

How to track clicks

On certain custom post type I would like track when visitor clicks to view for example phone number, website etc. I know I could do this with google analytics but I would also like to save this data to Wordpress, so I could show this info for post author on post edit screen. Also I would like to show total number of clicks and past week/month stats. Now how would you do this?

This is what I'm thinking. With jQuery detect click, then save the value to custom meta key with ajax. This would take care of the total clicks somewhat easily. But what about week/month clicks amount?

Does my idea have any point? Is there better ways to do it (maybe somehow with google analytics api?)?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire