it's like free CDN, they track users by referrer/ip and usually cookies(many people are signed to fb and google). which allows them to track your movement across the web. with gifs, they can additionally track mood/topics based on how the images are tagged and whether you are posting them or viewing them. they can create a psychological profile based on which images you are seeing since you'll most likely frequent the same places with specific topics. you don't need to be rocket scientist to figure it out. when something is free, you are ALWAYS the product.