Spanish Needles, aka Common Bidens, a pretty weed with white flowers/yellow centers that attracts butterflies. Yes, the seeds stick tenaciously to everything! You need to eradicate the weed in your yard/area if you can, or at least cut it down before it makes seeds if you like the flowers. Btw, when you're pulling it, be SURE to get it out all the way to the roots. It breaks easily, and any base, or even a stem will jump right up again. Once the rains stop, or you stop watering it will pretty much stop growing, but it will come back next year with a vengeance, until you pull it all before it sets seeds.
Get a fine slicker brush for your dog, and brush them out religiously, because they are the kind of thing that work their way in and can cause skin lesions on a pet. (I have a long-haired cat) I recently hired a young person and tasked them with getting rid of all the Spanish needles, but she hasn't made too much inroads on it yet. Had no trouble finding bushels of them in the front yard. Here's a shot showing the flower, leaves and seeds with their little grabber ends all ready to pounce.