Pure mileage is one option but many have voiced other structures such as altering prices based on time/place/road driven, which would require more data than simple odometer readings.
A more central issue is the synergy between fuel consumption and damage to roads. Heavier vehicles do more damage but also burn more gas and so pay more tax, a synergy between cost and revenue. A flat rate based on mileage alone would equate all EVs as the same regardless of some being massively more damaging than others. We would need different rates for difference classes/weights of vehicles.