Smart TVs know what you're watching and when. Smartphones know what you're doing on it and when. It's simply connecting the two at this point.
That still seems a little too simple. How are they controlling for multiple people in a household from the same IP address? How are they capable of telling the same person watching TV is performing the activity on the smartphone?
Voice detection.
You can get RAEL people to examine that ;)
Don't worry, we, unlike machines are still capable of doing that