How to modify the canonical tags on the duplicate 'Product Type' facets

20 1 2

We are trying to modify the canonical tags to ensure Google shows the right version of the product type pages in the search results, we need to point Google towards the correct indexable version.

For example, the page needs to have its canonical tag modified to read:

<link rel="canonical" href="">

This should tell Google that the page /collections/tops/product-type_hoodies is the same as /collections/hoodies, but that it should show /collections/hoodies in its search results.

Any help in trying to action this would be greatly appreciated.