
The diet connection has to do with producing 'normal' stools. Working as they should, with a normal stool, these scent glands should express just a small amount of fluid with the passing of every stool. During periods of diarrhoea or other abnormality with the stools, things can go wrong - these glands becoming clogged and maybe even infected.
I had one hound who had to have them removed - and believe me, it wasn't a nice surgery so if you can avoid this, please do. If your Cocker has run into problems back there, these glands (and it may not be both sides) would need flushing and packing (with antibiotics - I find topically treating with antibiotics far more effective then with oral antibiotics). Occasionally the meds. used may not get to the infection and need to be changed. And always remember, the more you mess around with these glands, which should never be empty (and they will refill after manual draining but if the original problem isn't sorted out, the same thing will keep happening), the more they may not settle down. I'd not touch them unless the dog is showing signs of discomfort/a smell!
If she's having loose stools, or the opposite, then you should adjust the diet to get a normal stool. Otherwise leave the diet alone - it could just be that the original problem hasn't been sorted out (switch antibiotics). My current Basset has had a bout of this, and it's said his anal glands are 'deep set' and there's loads of space back there, so a smallish normal stool may not do the job a big stool, passing through a tight area, will do!! I can manually drain these, but with him, I've never managed to do this - because of where they are located presumably. I don't do this 'internally' for fear I do more harm, than good!