I\'d like to log user activity in my app for presentation to users and also for administrative purposes. My customers are companies so there are three levels at which I may
I would also suggest the first approach but with KeyProperty:
class Activity(ndb.Model):
activity = ndb.StringProperty()
user_id = ndb.KeyProperty(kind='User')
company_id = ndb.KeyProperty(kind='Company')
Code would be much cleaner from the start and you can always fine-tune later.
For the rest Dan has covered most important points really well.