When it comes to investing in department stores, most people would opt for Macy's (NYSE:M) or Kohl's (NYSE:KSS) over J.C. Penney (OTC:JCPN.Q) or Sears Holdings (NASDAQ:SHLDQ).

Considering that J.C. Penney and Sears have seen significant revenue declines over the past several years while also having trouble delivering consistent profits, this shouldn't come as a surprise. On the other hand, sometimes things change when we're not watching. While looking at online trends over the past three months doesn't guarantee anything, it's still a valuable piece to the puzzle.

Online performance
All of the following information is based on data from Alexa.com, an online analytics company. Simply put, we're looking at which retailer sites are seeing increasing and declining traffic. This helps us determine how popular a brand is with consumers, especially young consumers, since many of them prefer to shop online versus at brick-and-mortar stores. Let's begin with Macys.com.

Over the past three months, Macys.com's global traffic ranking dropped 113 spots to 608. Its bounce rate (meaning the visitor views one page and leaves) has remained even at 26.7%. This is a good bounce rate, indicating that the homepage does its job. The pageviews-per-user metric slid 2.6% to 5.87. And time-on-site has slipped 8% to 6:07. These aren't great numbers, but they're not terrible, either.

The first thing that stands out about the Macys.com homepage is the classy attire featured there. The site also organizes everything in a way that allows for easy navigation. Furthermore, it offers what the other sites on this list don't -- a 2014 Spring Trend Report and a Men's Guide to Style.

J.C. Penney is supposedly in the midst of a turnaround. While this might be true, recent online trends suggest otherwise.

Over the past three months, JCP.com's global traffic ranking dropped 412 spots to 1,514. Over the same time frame, its bounce rate has increased 9% to 26.7% (still a good number.) Pageviews-per-user declined 9.3% to 7.11. And time-on-site has weakened by 11% to 5:24.

It appears as though JCP.com is good at engaging its customers, but trends are heading in the wrong direction. This might indicate that loyal customers are perusing the site, whereas "window shoppers" aren't very interested in what the site has to offer. JCP.com is constantly offering promotions. This currently includes an Extra 20% with your JCPenney Credit Card, an Extra 15% off with any form of payment, and an Extra 10% off watches, furniture, mattresses, and custom blinds and shades. 

There doesn't seem to be anything wrong with JCP.com. The brand simply faces a steep challenge, which is to maintain its current customer base while attracting younger consumers -- all the while not alienating its current customer base. The site's poor performance over the past three months likely stems more from branding than online aesthetics and functionality. 

The results for Kohls.com might surprise you. Over the past three months, Kohls.com's global traffic ranking has plummeted 290 spots to 865. Over the same time frame, its bounce rate has declined 2% to 23.9% (a positive.) However, pageviews-per-user sank 19.1% to 8.24; time-on-site has been almost as bad, suffering a 19% decline to 6:05.

Kohls.com is visually appealing and easy to navigate. The site also mirrors the company's strategy, which is to offer quality brands at discounted prices thanks to consistent promotions. The site's poor performance over the past three months is somewhat of a mystery. It could simply be due to a hesitant consumer and fierce competition.

Over the past three months, Sears.com's global traffic ranking has slid 84 spots to 691. The bounce rate has increased 9% to 35.7% (not terrible, but higher than peers). Pageviews-per-user declined 6.5% to 4.76. And time-on-site has weakened by 4% to 4:11.

Unfortunately, if you ignore direction and eliminate the global ranking, Sears.com holds the weakest overall scores for bounce rate, pageviews-per-user, and time-on-site. The homepage reminds consumers that the company offers free in-store pickup and free shipping on orders more than $59, but that doesn't seem to be enough to generate interest. 

What really stands out is an ad with people in their early 20s modeling clothes. Millennials don't frequent Sears. This raises the question: What is the target market for Sears?

None of the above retailers has been performing well online over the past three months, but one related retailer bucks the trend.

The bad news for Bed Bath & Beyond (NASDAQ:BBBY) is that its website has seen its global traffic ranking slide 131 spots to 1,726 over the past three months. On the other hand, its bounce rate has declined 12% to 28.6%. Pageviews-per-user increased 7.4% to 5:54. And time-on-site has improved 12% to 4:34.

Interestingly, the home page currently features a Dyson DC59 cordless vacuum. Other features include outdoor furniture sets and gift-registry assistance. All popular categories offer subheadings for super-easy navigation.

The big picture
Below is a comparison of how these retailers have performed on the top line over the past five years (cumulatively):

JCP Revenue (TTM) Chart 

J.C. Penney revenue (trailing-12-month) data by YCharts.

J.C. Penney and Sears have debt-to-equity ratios of 1.8 and 1.9, respectively. It's difficult to grow the top line when long-term debt is a constant nuisance. Macy's sports a decent debt-to-equity ratio of 1.1, whereas Kohl's has a debt-to-equity ratio of 0.8. Just as with recent online performance and five-year revenue, Bed Bath & Beyond is the most impressive in this area, with a debt-to-equity ratio of zero. 

The Foolish takeaway
Putting everything together, Bed Bath & Beyond and Macy's are consistently outperforming their peers. There is no immediate reason to think this will change. J.C. Penney and Sears are high-risk potential turnaround plays, but Foolish investors prefer steady long-term investments.

Kohl's falls somewhere in the middle. Despite performing poorly online, its revenue has remained somewhat steady, and it offers a 2.8% dividend yield. Macy's is the only other company on this list to pay a dividend, currently yielding 1.7%.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.