Mobile SEO

What You Want To Know

JavaScript (JS) is extraordinarily common within the ecommerce world as a result of it helps create a seamless and user-friendly expertise for customers.

Take, for example, loading gadgets on class pages, or dynamically updating merchandise on the location utilizing JS.

Whereas that is nice information for ecommerce websites, JavaScript poses a number of challenges for Website positioning execs.

Google is constantly engaged on enhancing its search engine, and a giant a part of its effort is devoted to creating positive its crawlers can entry JavaScript content material.

However, making certain that Google seamlessly crawls JS websites isn’t straightforward.

On this submit, I’ll share every thing you must find out about JS Website positioning for ecommerce and how one can enhance your natural efficiency.

Let’s start!

How JavaScript Works For Ecommerce Websites

When constructing an ecommerce website, builders use HTML for content material and group, CSS for design, and JavaScript for interplay with backend servers.

JavaScript performs three outstanding roles inside ecommerce web sites.

1. Including Interactivity To A Net Web page

The target of including interactivity is to permit customers to see adjustments based mostly on their actions, like scrolling or filling out varieties.

As an illustration: a product picture adjustments when the consumer hovers the mouse over it. Or hovering the mouse makes the picture rotate 360 levels, permitting the consumer to get a greater view of the product.

All of this enhances person expertise (UX) and helps consumers determine on their purchases.

JavaScript provides such interactivity to websites, permitting entrepreneurs to interact guests and drive gross sales.

2. Connecting To Backend Servers

JavaScript permits higher backend integration utilizing Asynchronous JavaScript (AJAX) and Extensible Markup Language (XML).

It permits net functions to ship and retrieve knowledge from the server asynchronously whereas upholding UX.

In different phrases, the method doesn’t intervene with the show or habits of the web page.

In any other case, if guests wished to load one other web page, they must look forward to the server to reply with a brand new web page. That is annoying and may trigger customers to go away the location.

So, JavaScript permits dynamic, backend-supported interactions – like updating an merchandise and seeing it up to date within the cart – straight away.

Equally, it powers the power to tug and drop components on an internet web page.

3. Net Monitoring And Analytics

JavaScript gives real-time monitoring of web page views and heatmaps that inform you how far down individuals are studying your content material.

As an illustration, it could inform you the place their mouse is or what they clicked (click on monitoring).

That is how JS powers monitoring person habits and interplay on webpages.

How Do Search Bots Course of JS?

Google processes JS in three levels, particularly: crawling, rendering, and indexing.

URL crawl processPicture from Google Search Central, September 2022

As you’ll be able to see on this picture, Google’s bots put the pages within the queue for crawling and rendering. Throughout this part, the bots scan the pages to evaluate new content material.

When a URL is retrieved from the crawl queue by sending an HTTP request, it first accesses your robots.txt file to test in the event you’ve permitted Google to crawl the web page.

If it’s disallowed, the bots will ignore it and never ship an HTTP request.

Within the second stage, rendering, the HTML, CSS, and JavaScript recordsdata are processed and remodeled right into a format that may be simply listed by Google.

Within the last stage, indexing, the rendered content material is added to Google’s index, permitting it to seem within the SERPs.

Widespread JavaScript Website positioning Challenges With Ecommerce Websites

JavaScript crawling is much more advanced than conventional HTML websites.

The method is faster within the case of the latter.

Try this fast comparability.

Conventional HTML Website CrawlingJavaScript Crawling
1Bots obtain the HTML file1Bots obtain the HTML file
2They extract the hyperlinks so as to add them to their crawl queue2They discover no hyperlink within the supply code as a result of they’re solely injected after JS execution
3They obtain the CSS recordsdata3Bots obtain CSS and JS recordsdata
4They ship the downloaded sources to Caffeine, Google’s indexer4Bots use the Google Net Rendering Service (WRS) to parse and execute JS
5Voila! The pages are listed5WRS fetches knowledge from the database and exterior APIs
6Content material is listed
7Bots can lastly uncover new hyperlinks and add them to the crawl queue

Thus, with JS-rich ecommerce websites, Google finds it robust to index content material or uncover hyperlinks earlier than the web page is rendered.

In reality, in a webinar on the way to migrate a web site to JavaScript, Sofiia Vatulyak, a famend JS Website positioning knowledgeable, shared,

“Although JavaScript gives a number of helpful options and saves sources for the online server, not all engines like google can course of it. Google wants time to render and index JS pages. Thus, implementing JS whereas upholding Website positioning is difficult.”

Listed here are the highest JS Website positioning challenges ecommerce entrepreneurs ought to pay attention to.

Restricted Crawl Finances

Ecommerce web sites typically have an enormous (and rising!) quantity of pages which can be poorly organized.

These websites have in depth crawl finances necessities, and within the case of JS web sites, the crawling course of is prolonged.

Additionally, outdated content material, akin to orphan and zombie pages, may cause an enormous wastage of the crawl finances.

Restricted Render Finances

As talked about earlier, to have the ability to see the content material loaded by JS within the browser, search bots must render it. However rendering at scale calls for time and computational sources.

In different phrases, like a crawl finances, every web site has a render finances. If that finances is spent, the bot will go away, delaying the invention of content material and consuming additional sources.

Google renders JS content material within the second spherical of indexing.

It’s vital to point out your content material inside HTML, permitting Google to entry it.

first round of indexing URL pathwayPicture from Google Search Central, September 2022

Go to the Examine aspect in your web page and seek for a number of the content material. For those who can not discover it there, engines like google could have hassle accessing it.

Troubleshooting Points For JavaScript Web sites Is Powerful

Most JS web sites face crawlability and obtainability points.

As an illustration, JS content material limits a bot’s potential to navigate pages. This impacts its indexability.

Equally, bots can not determine the context of the content material on a JS web page, thus limiting their potential to rank the web page for particular key phrases.

Such points make it robust for ecommerce entrepreneurs to find out the rendering standing of their net pages.

In such a case, utilizing a sophisticated crawler or log analyzer will help.

Instruments like Semrush Log File Analyzer, Google Search Console Crawl Stats, and JetOctopus, amongst others, supply a full-suite log administration answer, permitting site owners to higher perceive how search bots work together with net pages.

JetOctopus, for example, has JS rendering performance.

Try this GIF that reveals how the device views JS pages as a Google bot.

How google bot sees content on your pageScreenshot from JetOctopus, September 2022

Equally, Google Search Console Crawl Stats shares a helpful overview of your website’s crawl efficiency.

google search console crawl statsScreenshot from Google Search Console Crawl Stats, September 2022

The crawl stats are sorted into:

  • Kilobytes downloaded per day present the variety of kilobytes bots obtain every time they go to the web site.
  • Pages crawled per day reveals the variety of pages the bots crawl per day (low, common, or excessive).
  • Time spent downloading a web page tells you the period of time bots take to make an HTTP request for the crawl. Much less time taken means sooner crawling and indexing.

Shopper-Aspect Rendering On Default

Ecommerce websites which can be inbuilt JS frameworks like React, Angular, or Vue are, by default, set to client-side rendering (CSR).

With this setting, the bots will be unable to see what’s on the web page, thus inflicting rendering and indexing points.

Massive And Unoptimized JS Recordsdata

JS code prevents vital web site sources from loading shortly. This negatively impacts UX and Website positioning.

Prime Optimization Ways For JavaScript Ecommerce Websites

1. Test If Your JavaScript Has Website positioning Points

Listed here are three fast assessments to run on completely different web page templates of your website, particularly the homepage, class or product itemizing pages, product pages, weblog pages, and supplementary pages.

URL Inspection Software

Entry the Examine URL report in your Google Search Console.

GSC overviewScreenshot from Google Search Console, September 2022

Enter the URL you need to take a look at.

enter URL to inspect in GSCScreenshot from Google Search Console, September 2022

Subsequent, press View Examined Web page and transfer to the screenshot of the web page. For those who see this part clean (like on this screenshot), Google has points rendering this web page.

GSC reports page issuesScreenshot from Google Search Console, September 2022

Repeat these steps for all the related ecommerce web page templates shared earlier.

Run A Google Search

Working a website search will enable you to decide if the URL is in Google’s index.

First, test the no-index and canonical tags. You need to be certain that your canonicals are self-referencing and there’s no index tag on the web page.

Subsequent, go to Google search and enter – inurl:your url

Basics Of JavaScript SEO For Ecommerce: What You Need To KnowScreenshot from seek for [ inurl:], Google, September 2022

This screenshot reveals that Goal’s “About Us” web page is listed by Google.

If there’s some concern along with your website’s JS, you’ll both not see this outcome or get a outcome that’s just like this, however Google is not going to have any meta data or something readable.


site search on googleScreenshot from seek for [ inurl:hallway], Google, September 2022
site search on googleScreenshot from seek for [ inurl:homewares], Google, September 2022

Go For Content material Search

At instances, Google might index pages, however the content material is unreadable. This last take a look at will enable you to assess if Google can learn your content material.

Collect a bunch of content material out of your web page templates and enter it on Google to see the outcomes.

Let’s take some content material from Macy’s.

Macy's content

Screenshot from Macy’s, September 2022

Macy's contentScreenshot from seek for [alfani essential capri pull-on with tummy control], Google, September 2022

No issues right here!

However take a look at what occurs with this content material on Kroger. It’s a nightmare!

Kruger contentScreenshot from Kruger, September 2022
Kruger on google searchScreenshot from seek for [score an $8 s’mores bunder when you buy 1 Hershey], Google, September 2022

Although recognizing JavaScript Website positioning issues is extra advanced than this, these three assessments will enable you to shortly assess in case your ecommerce Javascript has Website positioning points.

Comply with these assessments with an in depth JS web site audit utilizing an Website positioning crawler that may assist determine in case your web site failed when executing JS, and if some code isn’t working correctly.

As an illustration, just a few Website positioning crawlers have a listing of options that may enable you to perceive this intimately:

  • The “JavaScript efficiency” report gives a listing of all of the errors.
  • The “browser efficiency occasions” chart reveals the time of lifecycle occasions when loading JS pages. It helps you determine the web page components which can be the slowest to load.
  • The  “load time distribution” report reveals the pages which can be quick or sluggish. For those who click on on these knowledge columns, you’ll be able to additional analyze the sluggish pages intimately.

2. Implement Dynamic Rendering

How your web site renders code impacts how Google will index your JS content material. Therefore, you must understand how JavaScript rendering happens.

Server-Aspect Rendering

On this, the rendered web page (rendering of pages occurs on the server) is distributed to the crawler or the browser (consumer). Crawling and indexing are just like HTML pages.

However implementing server-side rendering (SSR) is usually difficult for builders and may enhance server load.

Additional, the Time to First Byte (TTFB) is sluggish as a result of the server renders pages on the go.

One factor builders ought to bear in mind when implementing SSR is to chorus from utilizing features working straight within the DOM.

Shopper-Aspect Rendering

Right here, the JavaScript is rendered by the consumer utilizing the DOM. This causes a number of computing points when search bots try and crawl, render, and index content material.

A viable various to SSR and CSR is dynamic rendering that switches between consumer and server-side rendered content material for particular person brokers.

It permits builders to ship the location’s content material to customers who entry it utilizing JS code generated within the browser.

Nonetheless, it presents solely a static model to the bots. Google formally helps implementing dynamic rendering.

Google Search Central service to browser and crawlerPicture from Google Search Central, September 2022

To deploy dynamic rendering, you should utilize instruments like or Puppeteer.

These will help you serve a static HTML model of your Javascript web site to the crawlers with none damaging influence on CX.

Dynamic rendering is a superb answer for ecommerce web sites that often maintain plenty of content material that change continuously or depend on social media sharing (containing embeddable social media partitions or widgets).

3. Route Your URLs Correctly

JavaScript frameworks use a router to map clear URLs. Therefore, it’s vital to replace web page URLs when updating content material.

As an illustration, JS frameworks like Angular and Vue generate URLs with a hash (#) like

Such URLs are ignored by Google bots through the indexing course of. So, it isn’t advisable to make use of #.

As an alternative, use static-looking URLs like

4. Adhere To The Inner Linking Protocol

Inner hyperlinks assist Google effectively crawl the location and spotlight the vital pages.

A poor linking construction will be dangerous to Website positioning, particularly for JS-heavy websites.

One frequent concern we’ve encountered is when ecommerce websites use JS for hyperlinks that Google can not crawl, akin to onclick or button-type hyperlinks.

Test this out:

<a href=”/important-link”onclick=”changePage(‘important-link’)”>Crawl this</a>

If you’d like Google bots to find and observe your hyperlinks, guarantee they’re plain HTML.

Google recommends interlinking pages utilizing HTML anchor tags with href attributes and asks site owners to keep away from JS occasion handlers.

5. Use Pagination

Pagination is vital for JS-rich ecommerce web sites with hundreds of merchandise that retailers typically decide to unfold throughout a number of pages for higher UX.

Permitting customers to scroll infinitely could also be good for UX, however isn’t essentially Website positioning-friendly. It’s because bots don’t work together with such pages and can’t set off occasions to load extra content material.

Finally, Google will attain a restrict (cease scrolling) and go away. So, most of your content material will get ignored, leading to a poor rating.

Be sure to use <a href> hyperlinks to permit Google to see the second web page of pagination.

As an illustration, use this:

<a href=””>

6. Lazy Load Photographs

Although Google helps lazy loading, it doesn’t scroll by content material when visiting a web page.

It resizes the web page’s digital viewport, making it longer through the crawling course of. And since the  “scroll” occasion listener isn’t triggered, this content material isn’t rendered.

Thus, in case you have photographs beneath the fold, like most ecommerce web sites, it’s vital to lazy load them, permitting Google to see all of your content material.

7. Enable Bots To Crawl JS

This will likely appear apparent, however on a number of events, we’ve seen ecommerce websites by chance blocking JavaScript (.js) recordsdata from being crawled.

It will trigger JS Website positioning points, because the bots will be unable to render and index that code.

Test your robots.txt file to see if the JS recordsdata are open and out there for crawling.

8. Audit Your JS Code

Lastly, make sure you audit your JavaScript code to optimize it for the major search engines.

Use instruments like Google Webmaster Instruments, Chrome Dev Instruments, and Ahrefs and an Website positioning crawler like JetOctopus to run a profitable JS Website positioning audit.

Google Search Console

This platform will help you optimize your website and monitor your natural efficiency. Use GSC to observe Googlebot and WRS exercise.

For JS web sites, GSC lets you see issues in rendering. It stories crawl errors and points notifications for lacking JS components which were blocked for crawling.

Chrome Dev Instruments

These net developer instruments are constructed into Chrome for ease of use.

The platform permits you to examine rendered HTML (or DOM) and the community exercise of your net pages.

From its Community tab, you’ll be able to simply determine the JS and CSS sources loaded earlier than the DOM.

Chrome Dev ToolsScreenshot from Chrome Dev Instruments, September 2022


Ahrefs lets you successfully handle backlink-building, content material audits, key phrase analysis, and extra. It might render net pages at scale and lets you test for JavaScript redirects.

You can even allow JS in Website Audit crawls to unlock extra insights.

ahrefs add javascript for site auditScreenshot from Ahrefs, September 2022

The Ahrefs Toolbar helps JavaScript and reveals a comparability of HTML to rendered variations of tags.

JetOctopus Website positioning Crawler And Log Analyzer

JetOctopus is an Website positioning crawler and log analyzer that lets you effortlessly audit frequent ecommerce Website positioning points.

Since it could view and render JS as a Google bot, ecommerce entrepreneurs can clear up JavaScript Website positioning points at scale.

Its JS Efficiency tab gives complete insights into JavaScript execution – First Paint, First Contentful Paint, and web page load.

It additionally shares the time wanted to finish all JavaScript requests with the JS errors that want speedy consideration.

GSC integration with JetOctopus will help you see the whole dynamics of your website efficiency.

Ryte UX Software

Ryte is one other device that’s able to crawling and checking your javascript pages. It would render the pages and test for errors, serving to you troubleshoot points and test the usability of your dynamic pages.


seoClarity is an enterprise platform with many options. Like the opposite instruments, it options dynamic rendering, letting you test how the javascript in your web site performs.

Summing Up

Ecommerce websites are real-world examples of dynamic content material injected utilizing JS.

Therefore, ecommerce builders rave about how JS lets them create extremely interactive ecommerce pages.

However, many Website positioning execs dread JS as a result of they’ve skilled declining natural visitors after their website began counting on client-side rendering.

Although each are proper, the very fact is that JS-reliant web sites can also carry out effectively within the SERP.

Comply with the ideas shared on this information to get one step nearer to leveraging JavaScript in the best manner attainable whereas upholding your website’s rating within the SERP.

Extra sources:

Featured Picture: Visible Era/Shutterstock

What's your reaction?

Leave A Reply

Your email address will not be published.