The Fourth of July is a sacred American ritual filled with hot dogs and baseball, cold beer and sparklers.

But for many of America’s dogs, it’s the scariest day of the year. The booming of fireworks can be so terrifying that they tremble violently, try to hide in bathtubs or under beds, pace frantically or even lash out at humans and other pets.

Many dogs are so gripped by fear that they flee their homes, sometimes never to return.

USA TODAY talked to animal experts to find out what you can do to help your stressed-out pup this Independence Day. Here are their top tips:

Get them chipped

Only about 20 percent of pets in the U.S. are microchipped, said Renee Wolfgramm, animal welfare director for 24Pet, which distributes the devices.

Animal experts agree that microchipping is the best way to recover a lost pet. Once a dog is chipped, any vet or animal shelter will be able to use a scanner that will tell them who the dog’s owner is and how to reach them.

“Dogs are about twice as likely to get back home with a chip,” Wolfgramm said.

Two pups prepare to get chipped at a free event in Chicago in June 2023.

Most shelters and animal rescues now include chipping with pet adoption. For people with unchipped dogs, they can find free chipping events in their nearest city or get an appointment with a vet or shelter that can do it.

In 2021 alone, more than 3,000 pets in Los Angeles were reunited with their families because of microchips, according to LA Animal Services.

If your pet is already chipped, it’s important to make sure to update any changes in phone numbers or addresses using the 15-digit chip number. If you can’t find your dog’s information, a local animal shelter should be able to scan it to help owners track down how to update their registration, she said.

Fortify the house

Logan, a 15-year-old mixed-breed dog living in Madison, Wisconsin, always looks for a place to hide when fireworks are exploding. Because he's in his senior years, his dog mom makes sure the basement door is closed so he doesn't hurt himself trying to get down the steps to hide.

Chipping is designed to be a backup plan. It’s much easier to ensure your dog doesn’t get out in the first place.

If there are fireworks going on, be sure not to open any doors when the dog is nearby. They may bolt.

It may be best to keep them in a kennel if they’re already used to one. That way, they are contained to what they view as a safe space, said Lindsey Demko, who owns a dog-training business in Houston.