I was always interested in how clicking on particular ad, downloading and installing app can be related to the same click-on-ad action. Yes, there is advertising identifier which is unique per device and it's clear how it works when user clicks ad within AppA (from ServiceA), and then downloads AppB which has embedded SDK from the same ServiceA.
BUT how it works when user clicks ad on mobile website? I haven't found a solution how to retrieve advertising identifier through javascript.