Compteur de page avec Analytics où les données sont stockées dans la base de données MySQL

StackOverflow https://stackoverflow.com/questions/9528674

Question

Comme Cette question , je souhaite garder une trace du nombre de vues de page.Cependant, contrairement à cette question, j'aimerais utiliser MySQL pour stocker les données.Comment proposez-vous que je configuriez ma table pour endormir efficacement les données relatives à cette page spécifique?

Je voudrais également appliquer une "intelligence" au compteur de page.Comment puis-je garder une trace de la page d'entretien unique (similaire à) en plus des vues globales?Comment dois-je modifier la table ci-dessus pour convenir à ces changements?

En outre, pourrais-je utiliser ces informations pour suivre la publicité "Vues"?Si c'est le cas, comment?Sinon, alors je posterai volontiers cela comme une autre question.

merci.

Était-ce utile?

La solution

This could be the structure of the table you would record every-single-hit.

id | date | ip | user-cookie | agent

And then for performance reasons you could have another table that would be updated by a cron-job.

id | unique-hits

How to define a unique user?
This is a bit of a grey area where your own levels of paranoia kick in. A unique user can be a registered user and that should count as really one hit per user. You can follow the flawed one ip / one user. You can mix and match IP's and user agent's to try and better debunk unique users. Time can also be put into the mix, say every IP after x days will count as a new user.

Do you have a digital fingeprint?
Flash version, and other odities may cause your browser to be "different" from all other browsers creating a more unique view of yourself. Hit the great https://panopticlick.eff.org/ for a preview of what you may look like to a server.

How does Google Analytics does it?
Aparenttly they go cookie all the way.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top