Trakt is a platform that keeps track of TV Shows and Movies that you watch. You can integrate it into a bunch of different Media Center applications such as Plex or Kodi to automate scrobbling, via the Trakt website or via Mobile Apps.
I've been a user of Trakt since around 2013 and I absolutely love being able to look back on my yearly review of what I watched during each year and seeing how my love of movies and tv shows has changed genre over the years. If you have a look at my about page I currently have my Trakt and Last.fm scrobbling information at the bottom of the page, so how did I do it?
horribly, that's how and I'm not joking I'm so sorry for anyone that see's this code who may employee me in the future
I made a script to grab my scrobble information from Trakt a few years ago but lost it in the depths of time up until recently, I uploaded it to GitHub not long after adding some comments to it so it makes some sense. I do want to warn you though, that it's some quite impressive spaghetti code. You can view the code here.
If you're looking to do this yourself without using a pre-existing script, here's a basic example to get you started.