Keeping track of direction

Hey, so I am working on a First Person project and I need to keep track of the total duration of time that the player looks in every direction - up, down, left and right.
I know I need to use some sort of data structure to store the times, however, I am new to Unreal Engine and don’t know how to get the direction of the player. Any help is appreciated.

Then the title is not correct. Please fix it.

As for your actual question, just get the pawns forward vector.