Social media may be making you overspend—and it's not just because of the ads

Former employees explain why Facebook's secrets rarely leak

Rent, credit card bills and student loans call can make it more difficult to save money, especially for younger people. Now, according to a new study from the Allianz Life Insurance Company of North America, you can add social media to that list, too.

While Internet advertising has the potential to rake in millions of dollars per year, it isn't the only thing tugging at your wallet via social media, either. Allianz argues peer pressure on social media is part of the problem.

The study, which examined social media's impact on American spending habits, found that nearly 90 percent of millennial respondents say social media creates a tendency to compare their own wealth or lifestyle to that of their peers. That's compared to 71 percent of those in Generation X and 54 percent of Baby Boomers who say the same.

About 60 percent of millennials report feeling "inadequate" about their own life because of something they saw on social media, like flashy clothing or vacations, the study notes. And, as a result, 57 percent say they parted with money they hadn't planned to spend.

But, along with the "fear of missing out" on a new item, trend or experience, advertising does of course play its part in tempting you to splurge. Last year, Facebook brought in $39.9 billion of revenue from ads alone. Instagram recently rolled out Instagram Shopping, which allows people to view product descriptions and pricing. And other social media platforms facilitate monetary transactions directly from the website or app.

Summer vacation hack: Here's how traveling off the beaten path saved me hundreds

Companies will even "pay hundreds or even thousands of dollars to have their product mentioned in social media posts by an influencer with a large following," writes Reuters.

So, for these reasons, Paul Kelash, vice president of consumer insights for Allianz, says beware. For millennials "more than any other generation, social media and the allure to spend beyond their means could have long-term negative effects on their finances if they're not careful."

There are some ways to curb the influence of social media on your wallet. As Suze Orman, best-selling author, award-winning financial advisor and former CNBC host, writes in a recent blog post, before making a purchase, ask yourself, "Is this a need or a want?" If it's a "want," wait a while and then revisit the idea to avoid buying on impulse now and regretting later.

Also, try to create a budget — and then stick to it. If you're considering spending outside of that budget or prioritizing something material over a bill coming due, it may mean you need to cut back in some other way, according to Tom Corley, an accountant, financial planner and author of "Rich Kids: How to Raise Our Children to Be Happy and Successful in Life."

Adopt these habits in your 20s to be more successful in your 30s

It may also help to give up on the fear of missing out. Consider the example of self-made billionaire and entrepreneur Richard Branson. In his own ventures, instead of chasing down every opportunity and wearing himself thin, Branson says he focuses only on what is beneficial to his career.

That same line of thinking could be applied to social media: Don't chase down every opportunity to buy to impress or to fit in. Instead, focus on what can help you, individually, in the long term.

Millennials are making strides in the right direction and "are positioning themselves to be in good financial shape," the study notes. Almost 80 percent feel "financially confident," 58 percent believe saving for retirement is a basic necessity and 41 percent set aside money each month for saving. And overall, they're better with money than their older peers.

So, even with the temptation to spend based on social media, "millennials are finding innovative ways to build their financial strength," Kelash says, "and are becoming more confident because of these actions."

Like this story? Like CNBC Make It on Facebook!

Don't miss: Facebook feature now allows friends to give you money on your birthday—but there's a catch

Video by Richard Washington

Bizarre ways these rich business magnates save money