CiviDiscount - what is the correct URL for contribution pages
The documentation page was outdated. The correct format for event pages is

civicrm/event/register?reset=1&amp;id=XXX&amp;discountcode=YYYY


and 

civicrm/contribute/transact?reset=1&amp;id=XXX&amp;discountcode=YYYY


for contribution pages