Applies Rickard's changes to DB--NOTE: now with user = 'TESTUSER' only happens when user is not logged in
Ensures data gets saved EVERY time, regardless of whether user is logged in.
Merge pull request #26 from rgabrielsson/db_analytics_take_2

Db analytics take 2