The biggest issues isn't where the electronics are located, but where the baro sensing hole(s) is placed. Ideally the hole(s) that the altimeter uses to measure the barometric pressure is placed away from things that would affect a good reading. The rule of thumb is to place it far enough below a body tube joint, whether a nose cone or coupler, to avoid that junction from disturbing the airflow. You'll hear a variety of 'rules', most of them would say at least one caliber of body tube below a disturbance, and two for good measure. Things below the holes don't have any effect, so it's only the distance above the sampling holes to a joint or other disturbance.
It's important to remember that the A/V bay needs to be sealed from the rest of the rocket and the ejection charges. The altimeter(s) needs separate holes that vent the atmosphere to the sensor that are unaffected by protuberances from the rocket's airframe or from ejection charges.
The great thing about modern altimeters is they are designed to be immune from 'mach effects', which is when pressure may actually increase during flight due to Mach shockwave effects. This allows even greater flexibility than older altimeters provided. As a result flyers can now mount altimeters in nose cones, which used to be impractical because many nose cones see a temporary increase in pressure, depending on speed, which older altimeters would interpret as descending from apogee. So the good news is location isn't as sensitive as it used to be, but it is still important. Don't mount it below a fin, camera shroud, launch lug or rail guide; or within one caliper of a body tube joint or the nose cone, and you should be fine.
Tony