Very simple and quick task.
I am building an affiliate website in WP and Wocommerce.
Of course, info on the page are fetched from the producer.
Therefore I need to canonicalize the page so to not get penalized from Google.
Of course, I don't want to write each canonical tag singularly for each page/product.
Therefore I want a small script to run on EACH and every product page of my shop that would print on the DOM the canonical URL.
In sum I need:
- the script to run on all product pages only (NOT on all the pages of the website)
- need to fetch the URL of the canonicalization automatically FROM the CTA of the SHOP
- need to strip away the parameters ('?aff...') like in this example from the CTA:
(removed by Toogit admin)
and only keep the URL of the affiliate product by writing the final canonical tag:
- need, of course, to be visible by Google and be printed immediately on page load and be put on the right top spot
- need to be automatic and with no manual intervention
- need to be updates-proof
About the recuiterMember since May 20, 2018 Abhishek
from New York, United States