5 JavaScript SEO lessons from top ecommerce sites

5 JavaScript SEO lessons from top ecommerce sites

JavaScript search engine marketing must be a solved downside by now. It isn’t.

Ecommerce websites preserve hitting the identical crawling, rendering, and indexing points they have been 5 years in the past, now stacked on prime of headless builds, AI-powered suggestions, and frameworks that may conceal vital content material from Google.

These prime ecommerce gamers have found out find out how to ship quick, trendy JavaScript with out sacrificing natural visibility. Listed here are 5 classes price stealing.

1. Chewy makes use of JavaScript for UX

Chewy is among the largest on-line retailers of pet meals and provides within the U.S. They use Subsequent.js, a React framework for constructing web sites with built-in help for server rendering, static technology, and full-stack improvement options.

Which means you possibly can put vital content material within the preliminary HTML response without relying on client-side JavaScript.

Let’s have a look at a product web page just like the Benebone Wishbone Chew Toy.

Chewy product pageChewy product page

Navigate to View Web page Supply and also you’ll see the product title, description, pricing, opinions, Q&A, and breadcrumb navigation all current within the preliminary HTML. Googlebot can entry it on the primary go, without waiting for rendering.

Chewy page sourceChewy page source

That’s vital as a result of if an online crawler like Googlebot encounters points rendering your web page, the vital content material can nonetheless be parsed on the primary crawl. With the rise of AI chatbots, a few of which nonetheless don’t render JavaScript, this has turn out to be much more vital.

Not every part must be within the preliminary HTML, although. With out client-side JavaScript, the web page would really feel static and clunky.

Take the “Examine Comparable Gadgets” carousel. It’s loaded client-side, primarily there for buyers. The interior hyperlinks might provide some search engine marketing profit, however they’re not vital for indexing this web page the way in which the title, description, and pricing are.

Chewy similar items carouselChewy similar items carousel

Chewy will get this steadiness proper. The content material that issues most for indexing is on the market on preliminary load. Shopper-side JavaScript enhances the expertise slightly than delivering the content material that must be listed.

2. Myprotein makes navigation crawlable

Myprotein sells dietary supplements, vitamin merchandise, and a few health attire.

Their web site is constructed on Astro, a content-first framework utilizing Islands Structure to ship zero JavaScript by default whereas supporting parts from React, Vue, or Svelte.

Myprotein’s navigation is the half price learning. It’s an vital search engine marketing space for ecommerce websites, and so they get it proper.

Myprotein navigationMyprotein navigation

View the supply on any Myprotein web page and the navigation hyperlinks (classes, dropdown gadgets, and footer hyperlinks) are all within the preliminary HTML response. Astro makes this potential by means of its island architecture.

Myprotein source codeMyprotein source code

The navigation ships as an interactive island, that means Astro will hydrate it with JavaScript as quickly because the browser is prepared. However JavaScript makes the flyout menus interactive. It doesn’t create them.

These hyperlinks are additionally correct parts with href attributes, which is what crawlers like Googlebot must discover and follow links. Keep away from utilizing JavaScript click on handlers to simulate navigation, corresponding to:

Clear Protein Drinks

A crawler gained’t observe that. Use an ordinary anchor factor as an alternative:

Clear Protein Drinks

Not each web site will get this proper. When navigation relies upon solely on client-side rendering, there’s a window the place it’s invisible or empty.

Googlebot processes JavaScript in a separate rendering go that may lag behind the preliminary crawl, which might imply delayed discovery of inside hyperlinks vital for crawl effectivity and hyperlink fairness distribution.

3. Harrods embeds structured information within the HTML

Harrods is a luxurious division retailer promoting trend, magnificence, and homeware.

Their web site is constructed on Nuxt, a Vue framework for constructing web sites with built-in routing, server rendering, and static technology, plus an opinionated challenge construction.

Their structured information is delivered within the preliminary HTML response. View the supply on any product page and also you’ll discover structured information inside a