Here's a trick: measure the mass of the bottle before the experiment
Record it
Now shake it for 40 seconds
Slowly open the cap without letting ANY of the liquid out
Close lid
Repeat the shake for 40 seconds
Slowly open the case without letting ANY of the liquid out
Measure the final mass of the bottle
Subtract the two masses
And this should equal the mass of CO2 in a fizzy drink
Because the gas release IS CO2