How to count attachment views and reads

I’m trying to figure out a way to count whenever a user opens, views, or saves and attachment. I’d like to record the instance, maybe the DocID of the parent document and the time. Anyone have an idea?