Take another look at the sentence:
Drooling in anticipation of the treat, a dog cookie was given to Gizmo.
Drooling in anticipation of the treat, a participle phrase, is right next to dog cookie, an illogical target. Cookies don't salivate! Before you continue, review the rules for misplaced and dangling modifiers.
Go back to the sentence to try again.