There are 3 types of anonymous gifts.  The first one is that the charity knows the name of the donor but the donor requests that the charity not to divulge the identity of the donor so others will not know.  The receipt (which is not a public document) would have the donors name on it so there is nothing special about that.  The second one is that the donor requests that you keep their name secret but it is expecting you to let everyone know who made that anonymous gift!.  The third type of anonymous gift is truly anonymous – the charity does not even know the name of the donor.  The problem is that an official donation receipt needs to have the name of address of the donor.  One way to accomplish this is to follow the procedures set out below by CRA.  Another is to have the funds flow through a foundation or another charity which would provide the receipt and the foundation/charity would disburse the funds to the registered charity.
Anonymous gifts
Can a registered charity receipt an anonymous gift?

Under the Income Tax Act, an official donation receipt must show the name and address of the donor (and for an individual, his or her first name and initial).

However, the Canada Revenue Agency has made an administrative decision to allow registered charities to issue official donation receipts for anonymous gifts if the following procedures are followed:
• the donor establishes an agency or trust agreement to make the anonymous gift;
• the donor appoints an agent for the purpose of making a gift on behalf of the donor;
• the agent agrees to hold the funds in trust for the donor;
• the donor directs the agent to make a gift to a registered charity on the donor’s behalf;
• the agent agrees to direct the registered charity to issue a receipt in the amount of the gift in the name of the agent in trust; and
• the agent agrees to deliver the receipt to the donor for the purpose of establishing the details of the donation.
• CSP-G03, Gift (anonymous)