Real Value in Real TimeMongoDB-based Analytics at TeachStreet
Daryn NakhudaChief Technology OfficerTeachStreet.com
1
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 2
TeachStreet
A marketplace for learningWe help people find classes and teachers
We help teachers get more students
2
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
TeachStreet
Based in Seattle
7 Full-time employees - 50% dev/engineering
Launched in April 2008
3
3
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Tech Stack
Handful of physical servers
Ruby on Rails
Linux, Nginx, Mongrel, PostgreSQL, Sphinx
MongoDB (MongoMapper, because we <3 jnunemaker)
4
4
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Product
Profile Page
Class Listing and Session PagesPhone tracking, payment processing, marketing tools, etc.
5
5
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
The Problem
People love the idea, but they have no idea if it is really working for them.
6
“I’ve never once been contacted by a student who found me on TeachStreet”
6
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 7
June 2009The site is working for you, really!
7
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Teacher Dashboard (v1)
Quick Snapshot of Activity
Built on Google Analytics API
8
8
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Teacher Dashboard (v1) PROS
• Provided insight into a former void
• Easy to understand
• Quickly implemented, no IT impact
9
9
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Teacher Dashboard (v1) CONS
10
• Cumulative data only
• No date filters / trending information
• Not real-time
• URL-based, fragile
• “Operationally-Annoying”
10
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 11
May 2010That’ll be $3 please
11
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Metrics Dashboard v2
• Track conversions as well as traffic
• Real-time
• Date-filters / Trends
• Keep it simple and easy to use
• Flexible
12
12
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Page Events‘page_events’ collection
• Views to profile, listing & session pages
• Can also be used for homepage, search, featured placements, etc.
13
13
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Lead Events‘lead_events’ collection
• Messages
• Phone Calls
• URL Clicks
• Enrollments
• More Information / Affiliates
14
These are the things people will ‘do the math’ with
14
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Tracking Models
EventAttributes
15
15
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Tracking Models
PageEvent
16
PageViewEvent
16
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 17
Sample Page Event
{ "_id" : ObjectId("4bbbed8c4e40d3593b000001"), "updated_at" : "Tue Apr 06 2010 19:27:24 GMT-0700 (PDT)", "current_user_id" : null, "parent_teacher_id" : null, "listing_session_id" : null, "sub_page" : "main", "page_type" : "User", "session_id" : "747469eb432e27fc4a678a8805563dbf", "url" : "http://www.teachstreet.com/teacher/diablo-k9-academy", "subdomain" : null, "listing_id" : null, "teacher_id" : 18467, "_type" : "PageViewEvent", "count" : 1, "created_at" : "Tue Apr 06 2010 19:27:24 GMT-0700 (PDT)" }
17
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Tracking Models
LeadEvent
18
CallEvent
18
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 19
Sample Lead Event{ "_id" : ObjectId("4bbbf00a3352585b29000003"), "updated_at" : "Tue Apr 06 2010 19:38:02 GMT-0700 (PDT)", "parent_teacher_id" : 116845, "current_user_id" : null, "listing_session_id" : 194028, "session_id" : "4a2146ae80971b47ec6acd86827506f9", "url" : "http://www.teachstreet.com/redirect?source_id=cl-87e9otqv6o&url=http%3A%2F%2Fwww.wyzant.com%2Ftutorprofile3480833", "subdomain" : null, "listing_id" : 153395, "teacher_id" : 119644, "_type" : "ClickThroughEvent", "count" : 1, "source_type" : "ListingSession", "created_at" : "Tue Apr 06 2010 19:38:02 GMT-0700 (PDT)" }
19
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
How we track
JavaScript - for page actions, to filter robots
20
Or, just directly to the logger
20
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Reporting
Dashboard Presenters:
• Used from web as well as weekly activity emails
• Aggregate functions
• Map/Reduce queries
21
21
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 22
Some Presenter Code
22
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 23
23
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Metrics Dashboard (v2)
24
24
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com
Weekly Summary Email
25
25
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 26
Q & A
26
Real Value in Real TimeMongo Seattle - July 2010Daryn Nakhuda, TeachStreet.com 27
Thanks!If you like what you’ve seen, do me a favor:
Find great local and online <a href=”http://www.teachstreet.com/”>Classes</a>
on TeachStreet
Email: [email protected]: @daryn
27