The ability of Jolly Gerbils triggers when the gift is actually given. For permanent spells, that happens when the gift triggered ability resolves. For instants and sorceries, that happens when the spell resolves. It doesn’t matter if a replacement effect causes the gift you gave to become something else or if a static effect stops the player from receiving that gift.
Random a card of Magic: The Gathering (MTG), but you can also roll the D20 dice, random a Planeswalker, have fun with the random rules and more.