Shopify (SHOP 0.14%) has had a great growth story over the years. From less than $1.1 billion in revenue in 2018, the tech company more than quadrupled that tally, hitting $4.6 billion last year. However, for investors, the focus is now on its slowing growth rate and the challenges ahead for the company. Shares of Shopify are down 70% this year (versus just 13% losses for the S&P 500) in what looks to be an endless tailspin.

There are two particular mistakes the company has made in recent years that are causing its investors misery these days.

Shopify was too focused on growth and neglected costs

One of the things I always questioned about the tech company's growth was all the different avenues it was pursuing. It has a successful e-commerce platform that makes it easy for anyone to become a merchant and integrate with a website. But building on that success hasn't been enough -- in 2019, for instance, it went on a tangent and launched Shopify Studios, which is aimed at film and TV production.

In 2020, it also announced plans to spend $1 billion to build a distribution network across the U.S. that would put it on a collision course with online retail giant Amazon, threatening to lure away its merchants. It's a risky (and costly) move to take. Last month, it furthered that strategy with the completion of its $2.1 billion acquisition of fulfillment technology company Deliverr, as it aims to provide Shopify merchants with an easy-to-use logistics platform.

The problem with this is that Shopify probably should have been a bit more conservative with these expansion efforts as its operations aren't consistently profitable and margins are generally thin at best. Compared to other platforms, it just isn't generating strong numbers.

Chart showing eBay, Amazon, and Etsy all beating Shopify's operating margin since 2020.

Data by YCharts.

Focusing too much on growth at a time when the business is still struggling with profitability may only exacerbate the company's problems. In July, the company announced it would be laying off 10% of its staff. However, more drastic cost reductions may be necessary in order to improve its margins.

The company was too bullish on its future

One of the startling admissions in announcing the layoffs was that Shopify CEO Tobi Lütke acknowledged he was wrong in projecting that trends stemming from the pandemic would become permanent. In the press release announcing the layoffs, Shopify stated: "We bet that the channel mix -- the share of dollars that travel through e-commerce rather than physical retail -- would permanently leap ahead by five or even 10 years."

That rosy outlook led the company to hire over-specialized and duplicate roles. Shopify also admits it had groups that were "convenient to have but too far removed from building products." In essence, the company allowed itself to get bloated with staff and expenses on an extremely optimistic forecast. 

It's a rude awakening for a company that thought it could get away with non-stop spending, because the growth was there. When the growth slowed (revenue was up just 16% in the second quarter), everything came to a grinding halt.

Adding some conservatism to future forecasts and planning could save the company a lot of headaches going forward. It would also prevent the company from adding overhead and headcount it doesn't really need.

Has Shopify fallen low enough that it's worth investing in?

Shopify is trading around levels last seen in 2019. It's still not a cheap stock -- with a price-to-sales multiple of 10, it is pricier than Etsy (seven times sales) and well above Amazon, eBay, and Wix (each around three times sales). It has generally traded at a premium to those stocks in the past, but whether it still deserves that significant premium is the big question mark.

However, with the company focusing more on managing costs and improving its operations, it could still make for a good buy at its beaten down price. Shopify has the ability to come out stronger if it learns from its recent mistakes. If you're a long-term investor, buying Shopify now could prove to be a good move. There's already plenty of bearishness baked into the growth stock, making it an appealing contrarian buy.