Behavioral datasets are collected through various methods such as tracking online browsing behavior, analyzing purchase histories, monitoring social media interactions, conducting surveys, and using cookies or pixels on websites.