I have some product pages on my e-Commerce website that have variants on them. Each variant has three things that are relevant to this discussion:
- A SKU that is unique to our business
- A manufacturer part number (MPN)
- A URL that correlates to the configuration that is relevant to that SKU/MPN pairing, such that if you visit this URL it will automatically load the selected configuration. URL is something like: www.example.org/product1 ?variant-opt-1=123&variant-opt-2=581 with the bold part getting added based on the selection.
When the page loads for a product that is structured with variants, the page is used as a more general landing area with the ability to customize the product configuration using some drop downs on the side. That means that if a crawler visited the page, it wouldn't see those SKU/MPN pairings.
When changing these drop downs a different SKU/MPN pairing will be loaded via an AJAX callback. There could feasibly be hundreds of variants that all have a SKU/MPN pairing. What I'm wondering is, how can I properly add these pairings to my HTML content such that Google/indexers will be able to link queries with those SKUs or MPNs to my site? Ideally I wouldn't have to add all these variants as separate products on my site (which I know would be properly crawled based on some other products structure like this).
Please let me know your suggestions. The e-Commerce site is custom and is not Shopify, etc so I do have a high level of control over the generated HTML.
My current thoughts are:
- Add all the variant links into my sitemap (I'd have to change how this is currently generated), at least this way if every URL is crawled then it should be able to pull out the SKU and MPN properly.
- Create some sort of XML data that is loaded into the web page with all three of those fields, something like:
<tag sku="SKU-1", mpn="MPN-1", url="/unique?variant=12002148" />I'm just not sure how to "tell" Google that these are relevant for searches.
Mainly I want the SKU and MPN when searched, to link to this page, and if possible, to the unique URL.
Edit - 2020-04-17: I attempted to fix this by adding all the variant links in my sitemap however it turns out Google doesn't seem to like that. It ignores those links by flagging them as duplicate or canonically ignored.