Mountain goats also love salt. They are known to travel more than 15 miles to lick natural salt deposits, which provide essential nutrients. But human urine is packed with minerals from our salty diets, and mountain goats will forgo those journeys if there is a lot of urine around. As a result, many a hiker has strayed off-trail to tinkle and found mountain goats lurking, eager to lick a rock or eat a plant drenched in fresh, life-sustaining urine.

Over three years, Mr. Sarmento and his thesis adviser, Joel Berger, a scientist at the Wildlife Conservation Society and a professor at Colorado State University, closely observed mountain goats near and away from tourist-heavy areas in Glacier National Park, noting where the goats got their minerals and how cautiously they behaved. One of these sites, Logan Pass, receives about 3,500 visitors a day. At peak hours on a popular hiking trail there, a goat might encounter 400 people an hour.

To test how mountain goats reacted to predators, Mr. Sarmento dressed up as a bear and presented himself to goats at both tourist and backcountry sites, noting their responses (yes, this is a credible technique used in ecology research). He also took advantage of a nearby wildfire that led the park to close Logan Pass for a week in 2015, to see what goats did when there were no tourists.

The scientists determined that while predators and pee both were at play, predators seemed to be driving goats’ behavior. Mountain goats that stuck around humans were generally not as vigilant as their backcountry counterparts. When presented with the bear mimic, backcountry goats fled, on average, 600 feet farther than those near people.