I am building a customer-facing website that requires me to build 1) some analytics for customers, and 2) to maintain some internal analytics for improving the site further. These require different kinds of information.
For customers
I am now capturing visits and events relevant to customers with fields such as visit_count and event_count in different models. But, this system doesn't allow me to show my customers the number of visitors over time, their location, etc. My idea is to have a specific model called Analytic.rb that stores relevant info such as:
- visitor_id (of the user that visits a customer's area)
- ip_address (of that visitor)
- date
- referring_page
- customer_id (of the customer who has been visited/interacted with)
- code (for example: "vmain" for a visit to customer's main page, "vsignup" for a visit to customer's signup page, and "demo" for a decision to view the customer's demo).
For the webmaster
Our purposes are 1. understanding browsing habits better, 2. understanding usage statistics, and 3. mapping popular paths through our UX. Does it make sense to have a Visit.rb model that separately records every single internal page visit on our site? I imagine this would take up a colossal amount of space?
- user_id
- ip_address
- date
- referring_page
- visited_page
- state/notes/miscellaneous
What are your opinions of this set up?
How would you do it?
Am I getting the information I need or am I going overboard?
Thank you.