views:

40

answers:

1

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.

+1  A: 

If they are fit your needs, try using Piwik, for instance (however, it's written on PHP), or Google Analytics. You can export any data from them very easily to show it to your clients.

floatless
Get a good book on GA, and tag the site after it's been developed. The important thing to know is GA switches to sampled data after about 250,000 page views.
Jeff Paquette
@Jeff - would GA allow me to get both kinds of analytics I want, including not just the internals but the specific customer-centered stats?
sscirrus
Also, to both @floatless and @Jeff, would these solutions fully encompass the requirements I have or would I still need to use elements of my plan above?
sscirrus
@sscirrus, you're right, if you decide to do it by yourself, it will take a lot of space to store such a big amounts of data. At least you could use GA/Piwik for the latter element of your crafty plan. The former one depends on the data you want to server to your customers.
floatless
@sscirrus, I believe it would but you'd have to read up on GA's api to be sure. This sort of thing is what GA and other analytics programs are built for. The data volume you could generate is not for the faint of heart. And it's not just the data collection, it's the reporting as well that you need to consider.
Jeff Paquette
Thanks a lot Jeff and Floatless!
sscirrus