DNI works by using a script to dynamically change the phone number displayed on a website or landing page based on a visitor’s source. This allows businesses to track which ads or sources lead to phone calls, helping measure the effectiveness of different campaigns.