They offered to pay people to go to the gym. Guess what happened?

Have you ever thought, “You couldn’t pay me enough to go to the gym”? You’re not alone.

When researchers offered new gym members $30, $60 or a gift worth about $30 for going to the gym nine times in six weeks, attendance increased only slightly, according to the “Can Financial Incentives Help People Trying to Establish New Habits?” study by the National Bureau of Economic Research.

Published in July, the eight-month study separated 836 new members of a private gym in the Midwest into a control group and three incentive groups. On average, participants said they planned to exercise three times a week. What’s more, 43 percent said they had exercised on average one day or less per week in the prior year.

“The hope would have been that by targeting this, you could especially capture some of the people who early on fall off and get them to keep going for longer,” said Justin Sydnor, one of the report’s authors and a risk-management and insurance professor at the University of Wisconsin at Madison. “These incentive programs did increase slightly how often people went, but only by about one visit, and then it really has no lasting impact.”

A bigger sum wouldn’t have mattered, he said, because doubling the prize from $30 to $60 “didn’t really improve the trajectory at all, and so that makes us not have a lot of confidence that further increases would do a lot.”

Additionally, many participants didn’t go as often as they’d planned. Instead of three times, they went twice in the first week and were down to once a week by the end of the second month.

“I think a lot of that optimism is rooted in the fact that people join gyms at a moment of peak motivation,” such as on New Year’s Day or salient birthdays, Sydnor said. “At a moment of peak motivation, we join gyms, spend money, engage in a bunch of things thinking that our future selves will be similarly motivated. But then the challenge of actually showing up to the gym when you’re busy, and the weather’s bad outside, and you’re feeling a little tired and there’s other social options to do – all of those things get in the way in a way that we don’t anticipate very well.”

More effective approaches may be based on social intervention, such as meeting a friend or trainer at the gym, or getting reminders to go. Equinox Fitness has been testing a chatbot feature within its app since April. When new members download the app, the bot asks about their fitness interests and goals, and the days and times they plan to work out. Using artificial intelligence, the bot recommends classes based on users’ answers and messages them when they haven’t been to the gym in a while. The bot will be available to all members in the fall.

“From simple nudges like that through the app, behavior is shifting,” said Samir Desai, chief technology officer at Equinox. “People who are going through the chatbot experience are seeing almost a 40 percent increase in their engagement in subsequent weeks than people who don’t.”

Niche gyms that focus on one or a few exercise types may be more successful at helping people build habits. “Places that are more boutique-type, where there’s more of a group dynamic, that’s much better for exercise adherence,” said Todd Miller, director of George Washington University’s Weight Management and Human Performance Laboratory. “It’s the experience. It’s the bonding that you have with other people in the class. Those things seem to be important for retention.”

That group mentality is crucial at SoulCycle, said Gabby Etrog Cohen, the company’s senior vice president of public relations and brand strategy. “The collective energy in the room that [the riders] create is really important, and showing up for those people around them is equally as important as showing up for themselves,” she said.

Relationships may start at the gym but grow beyond it, said Scott Breault, chief marketing officer at Pure Barre. “You foster a sense of community within your gym environment, and if the community is strong, they don’t want to leave it,” Breault said. “They see the same people when they go, they link up afterward, they talk on social media and say, ‘Hey, when are you going to class?’ or ‘Are you going to the gym?’ So it becomes much more than just four walls and some equipment or instructors. It becomes ‘This is a vital part of my life and keeps me happy.’ ”

For some people, though, exercising regularly may simply never become a habit, Sydnor said. It may be that “some types of people . . . are prone to becoming addicted to something like exercise while others just will never develop that. That’s an open question,” he said.