I’ve always used the Inversense MPU9250 package. They are out of production, but you can still find them for purchase. They are cheap to buy, I’m going from memory, but about $5-10.
Since the MPU9250 has separate I2C addresses for the acc/gyro and the magnetometer unit pay careful attention to the I2C bus frequency. I’ve found 400KHz to be about the fastest reliable I2C bus frequency to use.
Also remember you need to tie the SCL-ECL
and SDA-EDA
pins together. The magnetometer I2C address is on the aux (extended) bus (ECL/EDA). (that is done underneath the board in the picture with jumpers – along with jumpers from the power and ground rails to Vcc and Gnd pins.)