How to count the number of clicks or impressions of an image link on a php page?
Ask a master to give some ideas?
See a lot of online, useful database with the cache, the kind of optimal?
Reply content:
How to count the number of clicks or impressions of an image link on a php page?
Ask a master to give some ideas?
See a lot of online, useful database with the cache, the kind of optimal?
Redis or Memcache write a key, the image link open background processing when the key value plus 1.
You should use caching to do frequent statistical work, and ultimately this data is to be saved to the database, if the cache is cached, once the buffer is lost (especially memory-based cache), then you must not cry to death
Simply want to know the number of clicks per link you can use directly with Google Analytics _trackevent ()
Following:
1. You can link the redirect in the htaccess, write a log, and then write a timed script to batch processing in the storage.
2. Redis is memory-based, but can also be implemented (Redis periodically writes updated data to disk).
3.MC, because it is memory-based, easy to lose.