It will be anal glands and it is often caused by them being over full - she will need them emptying by the vet or a vet nurse.
Wagg is not a particularly good quality food and the problem with poor quality food is that it creates an excess of waste matter which is processed through the dog and overloads the anal glands.
It isn't always food which causes it - sometimes it just happens for no real reason. But food is a good place to start. Try something like Wainwrights from pets at home or skinners salmon/duck/turkey and rice instead - once they've been emptied, of course!
My dog has anal gland issues. He is fed Burns Alert dry kibble and things have improved greatly. You can empty the glands yourself, but it's best to get your dog checked over by a vet in case of infection, and you really need to be shown how to do it safely and effectively. My dog sees me coming with the rubber gloves now and just sighs with resignation.