It isn't just Facebook that has been doing this. Web development tools are able to track scroll and mouse movements as well, and have been used to test website usage
Tracking an individuals mouse movement across devices for perpetuity, packaging said data as a product offering to potential advertisers, seems to be a more extensive undertaking than simply UI/UX improvements.