Commercial marathons such as the London Marathon do not qualify for the fundraising event exemption, so any mandatory entry fee or minimum sponsorship target is treated as standard-rated consideration for entry if the event takes place in the UK.
Many charities ask participants to pay a small entry fee, so as to obtain VAT recovery on the purchase of places, with participants then making non-binding pledges to raise a minimum amount. In this situation the entry fee is standard rated (if the event takes place in the UK) but any sums raised above this are outside the scope of VAT. If the registration fee is enough to cover the price an individual would pay for a place, they have bought the benefit for Gift Aid and all their relatives can donate with Gift Aid.