I set up Google Analytics for my Ruby on Rails site a while ago, and configured it to include a field to indicate if a user is logged in. The tag code looks like this (included in the page header on all pages):
As you can see, if current_user is available from the Ruby controller, it sends that info to GA. I then access that data in my reports by applying the filter 'Signed in with user ID exactly matches yes' which is how all the docs say to do it. However, by comparing the GA records to my database records, I've determined that the data returned by GA using this comparison is under-reporting logged-in user activity by almost 67%! Does anyone have any idea what could account for this discrepancy? I've already checked and the user_id value is accurately rendering in the javascript tag when inspecting the page in my own browser.