Device matching can be done through user authentication with username login. But only Facebook and Google can deliver a significant authenticated audience and their networks are "walled gardens".
The alternative is to execute probabilistic device matching mostly using device location, time stamps and behavior. If two devices are often used from the same location in a given time range, they are linked to a household or an individual according to other available data. Device location is determined with IP addresses and triangulation.
Accuracy of probalistic device matching is estimated to be between 50% and 90% of success rates in linking users across devices.
Image credit Dawbridge whitepaper.
An algorithm used for probabilistic matching method :
Image credit Dawbridge Whitepaper