عداد الصفحة مع Analytics حيث يتم تخزين البيانات في قاعدة بيانات MySQL

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

سؤال

مثل هذا السؤال ، أود أن أتبع عدد طرق عرض الصفحة.ومع ذلك، على عكس هذا السؤال، أود استخدام MySQL لتخزين البيانات.كيف تقترح أن أقوم بإعداد طاولتي لتهاجية البيانات ذات الصلة بكفاءة إلى تلك الصفحة المحددة؟

أود أيضا تطبيق بعض "الذكاء" على عداد الصفحة.كيف يمكنني تتبع الصفحات الفريدة (على غرار ذلك) بالإضافة إلى الصفحات العامة؟كيف يجب أن أقوم بتعديل الجدول من أعلى لتناسب هذه التغييرات؟

بالإضافة إلى ذلك، هل يمكنني استخدام هذه المعلومات لتتبع الإعلان "المشاهدات"؟إذا كان الأمر كذلك، كيف؟إذا لم يكن كذلك، فسوف نشر ذلك بكل سرور كمسألة أخرى.

شكرا.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top