The federal government will establish a mandatory code of conduct to oversee the way baby formula products are advertised in Australia.