Conventional SEO ways alone aren’t sufficient to maintain ecommerce websites aggressive in right this moment’s AI-driven search panorama.
To enhance search visibility and join with related queries, ecommerce manufacturers can leverage cosine similarity – a mathematical idea that helps serps perceive content material relationships.
Through the use of cosine similarity, you may improve your website’s content material relevance, making it simpler for Google to acknowledge and rank your pages precisely.
This text will clarify cosine similarity, the way it works in fashionable search algorithms and sensible methods to use it to spice up your ecommerce search engine optimization technique.
First, let’s dive into two key ideas: embeddings and cosine similarity.
What are embeddings?
Embeddings are vital for large language models (LLMs) and fashionable search. When both a search engine or LLM reads your content material, they want a scalable technique to analyze it.
So what do they do?
They use embeddings to vectorize the content material and translate it right into a numeric worth. See a illustration right here:

That is precisely what the Google BERT mannequin does. It extracts content material out of your website after which creates an embedding, which is a numerical illustration of your content material.
These embeddings are then saved in a vector database. Since they’re saved as numerical representations, they are often “plotted out” inside the database:


That is a particularly necessary idea to grasp cosine similarity.
What’s cosine similarity?
After these ideas are translated into numerical values and saved, fashions can carry out calculations to find out the “distance” or similarity between any two factors.
Cosine similarity is one methodology used to measure how intently associated these factors are.


Merely put, ideas which have excessive cosine similarity are understood to be extra associated to one another. Ideas with decrease similarity are much less associated.
So “search engine optimization” and “PPC” would exhibit greater cosine similarity than “shark” and “PPC.”
That is how Google can numerically establish whether or not two ideas are associated or if a web page is optimized for the goal.
There’s a laundry checklist of proof that Google makes use of this idea in its personal algorithm. Google’s Pandu Nayak wrote the next in a Stanford course on data retrieval:
- “As a consequence, we are able to use the cosine similarity between the question vector and a doc vector as a measure of the rating of the doc for that question.”


In layman’s phrases, they’ll use cosine similarity to grasp how related a chunk of content material is to a given question.
The Google Search API leaks comprise quite a few references to embeddings, with over 100 mentions of the idea all through the paperwork.


Analyzing cosine similarity on websites
Understanding cosine similarity conceptually is beneficial, however how are you going to apply it to your individual website?
The excellent news is that Google’s BERT mannequin is open-source, permitting you to make use of it to research your website’s content material.
This implies you should utilize Google’s personal instruments to check and measure how related your content material is to focus on queries.
This blog post from Go Fish Digital (disclosure: I function the company’s VP of promoting) shares a Python code you should utilize to entry BERT and check the relevance of your content material.
We’ve additionally constructed an extension that creates embeddings for a whole web page.
The extension extracts your content material, runs it by means of Vertex AI and BERT, and offers you precise scoring of your content material for all of the sections of a web page.


The extension additionally offers you an general Web page Similarity rating. This calculates the typical of all the embeddings on a given web page right into a single 0 to 10 rating. (As of now, the extension is in beta, however you may request entry.)


Even with out these instruments, you may nonetheless incorporate the idea of cosine similarity into your ecommerce optimization.
Some normal ideas that assist enhance cosine similarity evaluations embody:
- Utilizing goal terminology on the web page.
- Guaranteeing content material is greater on the web page and has sturdy similarity.
- Utilizing associated terminology of the core subject.
- Lowering and eradicating content material that isn’t in regards to the subject of the web page.
- Guaranteeing core headings are optimized for similarity.
Get the e-newsletter search entrepreneurs depend on.
Making use of cosine similarity to ecommerce websites
With this information, we are able to higher perceive the components that drive high-performing ecommerce websites.
Websites that optimize for cosine similarity at scale usually tend to carry out higher in search.
However how do these high-performing websites naturally incorporate cosine similarity?
Let’s discover some examples utilizing our similarity rating extension.
1. Product naming conference optimization
Optimizing product description pages (PDPs) optimizes your product itemizing pages (PLPs).
Because of this optimizing your product pages for a selected question additionally enhances the relevance of your class pages.
The merchandise listed in your class pages naturally undertake the identical queries and terminology because the guardian class.
For instance, REI’s use of “Males’s Mountaineering Boots” of their product naming conventions additionally helps optimize the guardian class web page.


Understanding the idea of cosine similarity, we are able to now see why this helps enhance search engine optimization at scale.
When working our similarity rating extension on high of this web page, we are able to see that REI’s personal product grids have sturdy matches in opposition to the guardian class.


Dig deeper: Product page SEO: A complete guide
2. search engine optimization textual content on class pages
A greatest observe for ecommerce websites is to incorporate search-optimized textual content on the backside of class pages.
Usually, this consists of 3-5 paragraphs of content material positioned beneath the product listings, offering further details about the class as a complete.


I lately conducted a LinkedIn poll asking if this kind of textual content on the backside of class pages is helpful, with 82% of respondents confirming that it’s.


Once we view this initiative by means of the lens of cosine similarity, it turns into clearer why it’s efficient. It helps ecommerce websites considerably enhance the content material relevance of their class pages.
When completed accurately, you may see how properly this content material aligns with goal key phrases. For instance, on Chewy’s Dry Canine Meals web page, most of their sections rating 7.0 or greater in similarity.


Dig deeper: How to make your ecommerce content more helpful
3. Associated classes
One other efficient ecommerce search engine optimization technique I’ve lengthy advocated is utilizing internal links on the backside of class pages to cross-link to different related classes. These are sometimes labeled as “Associated classes” or “Associated searches.”
For instance, REI contains “Associated searches” on the backside of its class pages, which helps to strengthen the relevance and connectivity of its content material.


Wanting on the Wayfair website, they really embody each choices:


Let’s see how these options affect the content material’s cosine similarity in opposition to the core question. For REI, we are able to see that every merchandise strongly impacts content material optimization.


Not solely are they serving to the core class web page, however they’re additionally establishing a powerful inside linking system to different semantically associated pages.
Dig deeper: Retailers: Google is becoming your new category page
4. Product evaluations
It could be shocking, however I consider product evaluations are an underutilized asset for search engine optimization on ecommerce websites.
Usually, I see websites enable solely 5-10 evaluations to be listed, then use JavaScript to forestall additional indexation.
Nevertheless, when evaluations are related, they could be a highly effective software for leveraging cosine similarity at scale.
If reviewers constantly point out the product’s identify or class, it helps convey your product nearer to the basis question, enhancing its relevance.
For instance, have a look at how related evaluations can improve a web page’s similarity rating and general search engine optimization efficiency.


Now that you simply perceive the function of cosine similarity and its affect on search, you may apply these ideas to optimize your ecommerce website and content material construction.
Essentially the most important enhancements will come from scaling your efforts to boost similarity throughout your website.
Dig deeper: Ecommerce content: How to demonstrate beneficial purpose and expertise
Contributing authors are invited to create content material for Search Engine Land and are chosen for his or her experience and contribution to the search neighborhood. Our contributors work beneath the oversight of the editorial staff and contributions are checked for high quality and relevance to our readers. The opinions they categorical are their very own.