At various times in the past I've found some V fares booked through UA's website to specifically preclude mileage accrual. As already noted, there is no great consistency in basing mileage accrual on fare class. I recently had a trip to the US booked in V through a TA that earned full mileage.
Bottom line - check the fare rules. If you're booking through UA that should tell you if accrual is permitted.