By the end of this year, millennials are set to overtake Boomers as the largest living generation in the U.S. And by 2017, they’ll be outspending them. It’s more important now than ever to gain Gen Y’s loyalty. While some brands have absolutely nailed it, some marketers are still unsure how to win over this moving target.

Here are seven ways brands in all verticals can effectively reach Generation Y.

1. Exhibit diversity.

This generation of young adults is the most racially diverse in the history of the U.S; 43% of them are non-white, per Census figures. Moreover, approximately three-fourths of millennials support same-sex marriage, a significantly higher share than any of the older generations.

With that said, millennials are highly aware of social, political and economic inequality. They are much more cognizant when brands miss the mark on diversity. Retailer Brandy Melville, for example, has made headlines in recent months for its “one-size-fits-most” attire and for portraying a very specific look in all of its marketing copy. Though the brand has amassed a following among aspirational teens, women of all backgrounds have taken to social media to express feelings of exclusion while browsing the brand’s ecommerce page and Instagram feed.

A great example of a retailer acknowledging a need for diversity is Nasty Gal. The brand consistently features photos of people from all backgrounds on Instagram. In November, the brand re-grammed a post from Mindy Kaling, a celebrity who is frequently lauded by millennials for being relatable. In addition to it being an exciting treat for her fans, it served as incredibly valuable UGC since the picture showed Kaling trying on an outfit in a Nasty Gal store.

nasty gal instagram

2. Play into nostalgia.

#tbt. #flashbackfriday. Every BuzzFeed listicle known to man. There’s something about remembering the 90s that just hooks millennials. In fact, the constant chatter surrounding now defunct products has led some retailers to bring them back.

Last month, #ExplainThe90sIn4Words was the No. 1 trending topic on Twitter for at least two days. Twitter users reminisced about their favorite shows, games and snacks. Several brands jumped on the trend, and used the opportunity to engage with their nostalgic fans.

Urban Outfitters, for example, produced one of the top tweets with its reference to “Clueless.”

Urban Outfitters twitter

JCPenney tweeted a photo of a Steve Urkel shirt alongside his signature phrase. The tweet included a link to JCPenney’s site, where users could then purchase the shirt.

jcpenney twitter

3. Tap into their optimism.

Adulthood has been no picnic for Gen Y. It’s an oft-repeated tale: “Everyone told me that as long as I went to college, I’d end up with a good job. Now, I’m underpaid and buried in student loans.” It’s no wonder they’re the most stressed generation. Armed with significantly more debt than their male counterparts and rising rates of single parenthood, millennial women feel it a bit more.

But for most of them, there’s a light at the end of the tunnel. Eight in 10 young women say they are optimistic about their current standard of living. And when it comes to celebrity role models, they are more likely to look up to those who have overcome adversity. In a 2014 survey conducted by AOL, they ranked Ellen DeGeneres, Oprah, Martin Luther King, Jr., and Gandhi as their top role models.

Brands that tap into this demographic’s feelings of optimism will come across as highly influential.

Nike, for example, is in the business of helping consumers fulfill their athletic and fitness goals, but the inspirational quotes that accompany every one of the photos posted to the brand’s Instagram feed are a big pull for Gen Y. Some millennials have declared that they simply follow the brand to get a dose of inspiration.

Nike positive instagram

4. Be funny.

The key to resonating with millennial men, on the other hand, is laughter. Some 88% of millennial men reported in a Comedy Central survey that humor is crucial to their self-definition.

A blogger for digital agency Moosylvania identified the moment he remembered when Old Spice became a “cool” brand. After the brand launched some hilarious YouTube videos in 2010 featuring an NFL player, he found himself exclusively buying Old Spice deodorant.

Bud Light’s #UpForWhatever is another prime example of this. The brand, which markets heavily to adult millennials, features funny videos and photos on its Instagram and Twitter pages. Their campaigns frequently involve asking fans to upload clever UGC for a chance to attend exclusive parties and concerts.

Bud Light funny instagram

5. Throw gender roles out the window.

Although certain messages might resonate more with males vs. females, marketers — particularly those in the CPG space — need to be aware that the lines are progressively blurring between the two genders. Six in 10 millennials feel they don’t need to conform to traditional gender roles.

Millennial men are driving the “renaissance” of males by embracing things that were once considered “feminine,” such as fashion and child care. The dads of today are significantly more likely to stay home with their children than their fathers were. If a diaper or cleaning product brand consistently omits dads from the picture, they aren’t recognizing the active role men are increasingly taking in U.S. households.

Pampers is a brand that wonderfully gives nods to mothers and fathers alike. The brand’s Facebook page is a collection of photos featuring mothers, fathers and babies from all walks of life.

Pampers dad facebook

6. … And along those lines, don’t forget the non-parents.

While parents are buying for an entire household, single consumers often spend more per person on groceries. They should not be forgotten. Slightly less than half of millennial women are moms, and even fewer of the men are parents. This presents an amazing opportunity for CPG brands to engage and resonate with non-parents, who still make up the majority.

lysol moms facebook

Lysol, for example, tends to display young children and moms on its Facebook fan page, giving off the impression that other demographics aren’t as devoted to their products, which is simply not true. Kids aren’t the only ones who make messes! A brief look at their fan page shows men and women, who are clearly not parents, wanting to engage with the brand. The opportunities for Lysol to engage with single millennials is endless.

7.    Humanize the brand.

Millennials tend to see brands as celebrities. Getting a reply, retweet or re-gram from a much-loved company induces a high level of excitement in a young consumer. No one really thinks about the fact that a Community Manager or Social Media Manager is running the show. That person just feels ecstatic to have heard back from their favorite brand.

Imagine taking that one step further and actually being friends with a brand. Taco Bell is the quintessential example of that. In 2014, Taco Bell sent out 1,000 burner phones to people they had identified as superfans and social influencers, and called them at random times of the day with missions to complete. Their Instagram photos and captions emulate the way their target audience posts, with filtered photos and cleverly-placed lines of song lyrics from the likes of Katy Perry and Beyonce. They also have an active presence on Snapchat, giving their fans the feeling that they are getting personalized messages from a buddy.

taco bell instagram

Establishing Brand Loyalty

The common belief that millennials aren’t brand loyal consumers is somewhat of a myth. While price is often a major determinant in what they buy, about one-quarter of them feel that they and their peers are more brand loyal than their parents. Another 40% believe they exhibit the same level of brand loyalty as their parents. By listening intently and engaging accordingly, marketers can capitalize on that sentiment.