LOL! Finally! Someone else is asking about this! My SD has/does the same thing. I found a "black box" down under the floor mat that the ticking comes from. It's under the glove box, mounted on the forward, almost verticle part of the footwell. Starts ticking when the doors are opened, ect as you say. Ticks for 30 seconds or so, then quits. It's quite a bit louder when you have the floor mats and underlying insulation out.
Have no freakin' clue what it does.