Blue Apron box being delivered
Blue Apron

Shares of Blue Apron spiked Tuesday after the company posted a smaller-than-expected fourth-quarter loss, helped by improvements at its fulfillment center in New Jersey.

The stock was up 6%. Early in Tuesday's session, it had risen nearly 27%.

Blue Apron has been struggling to overcome well-publicized operational issues that have dragged its stock down more than 66% since it started trading in late June. Shares have slipped from $11 to just under $4 during that period.

The meal kit company said increased automation bolstered productivity in the Linden, New Jersey, center and brought it in-line with its counterparts in California and Texas.

The company said its net loss in the latest quarter narrowed to $39.1 million, or 20 cents per share, from a loss of $26.07 million, or 39 cents per share, last year.

Analysts had expected Blue Apron to report a loss of 27 cents per share during the quarter.

Revenue fell 13%  in the quarter to $187.7 million, due to a decrease in customers and orders as Blue Apron scaled back its marketing efforts.

Last quarter, then-CFO Brad Dickerson said the company would continue to shrink its marketing costs in the fourth quarter, which would likely lead to less revenue.

The company spent $25.2 million, or 13.4% of revenue, on marketing in the fourth quarter. In the same period last year, Blue Apron spent $37.1 million on marketing, or 17.2% of its revenue.

Blue Apron started to ramp up its marketing in late December as it geared up to launch its new brand campaign.

The company said the number of customers fell 15% year-over-year and fell 13% from the prior quarter.

Dickerson, who became CEO in late November, said increased competition in the meal-kit space as well as decreased marketing contributed to slowing customer acquisition.

Average revenue per customer increased to $248 from $246 from last year.

The company already has started testing the waters in offering specialized programs. In January, it started selling a Whole30 meal plan. The 30-day diet plan, which will be available through Feb. 26, focuses on "whole" foods such as fresh fruits and vegetables and eliminates items like sugar, alcohol, grains, soy and dairy.

More: Blue Apron replaces CEO-founder Matt Salzberg after post-IPO fumbles

More: Growing home meal kit phenomenon is stirring up food industry, stressing out supermarkets

More: Blue Apron customer base shrinks but individuals are spending more

Dickerson said the company saw the number of customer sign-ups jump after it introduced the partnership with Whole30. He said Blue Apron will continue to roll-out these partnerships but declined to comment further.

In addition, the company will continue to offer flexible plans and recipes. It has already introduced meals that could be made within 30 minutes, meals that require less cleanup and brought back customers' favorite recipes.

© CNBC is a USA TODAY content partner offering financial news and commentary. Its content is produced independently of USA TODAY.