It's done incredibly often, and there are many ways to do it. It's so common, the ACA has written a how-to article on it.http://www.adventurecycling.org/features/cyclingforcharity.cfm
I believe the most important thing is to establish your ground rules very clearly right from the start. If you're not going to be taking a single penny from the donated funds, then say so very clearly. If possible, have the donations go directly to the charity without passing through your hands. Or have them give checks to you made out to the charity, not you.
On the other hand, if you intend to use a portion of the donated funds to offset your costs, then also state that very clearly. If the funds are given to you in your name, then the donors will not get a tax deduction and you will need to claim the money as taxable income. So this isn't the best idea.
The simplest way is to establish a journal somewhere (e.g., blogspot, wordpress, crazyguyonabike, facebook, etc.), and put a link there directly to your charity's donation page. Another alternative is that many charities provide a way to track donations from a specific fund-raising effort. Contact the intended charity for details. A third alternative are independent organizations (e.g., firstgiving) that provide a way to funnel money to charity.