(Squarespace) How to change root location on Product Breadcrumbs

To change root location on Product Breadcrumbs.

#1. You can click on Gear icon

#2. Click Advanced > Page Header Code Injection

#3. Paste this code. Replace Google with new url.

<script>
  document.addEventListener('DOMContentLoaded', function() {
  var links = document.querySelectorAll('a.ProductItem-nav-breadcrumb-link:first-child');
  
  links.forEach(function(link) {
    link.href = 'https://www.google.com';
  });
});
</script>