Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonical Tags for Pagination on PLP #334

Open
sja-dS opened this issue Jul 16, 2021 · 9 comments
Open

Canonical Tags for Pagination on PLP #334

sja-dS opened this issue Jul 16, 2021 · 9 comments

Comments

@sja-dS
Copy link

sja-dS commented Jul 16, 2021

  • FACT-Finder-Web-Components Magento2-Module version (see composer.json):
    • 1.6.8 (with FF NG v1.1.3)
  • Magento edition and version:
    • 2.4 B2B
  • PHP version:
    • 7.4
  • Expected behavior:
    • On a Product List Page the Canonical Meta Tag in the Header should always reference to the current Page
  • Actual behavior:
    When you are on a page, e.g. https://www.myagrar.de/pflanzenschutzmittel/?page=2 the canonical Reference is <link rel="canonical" href="https://www.myagrar.de/pflanzenschutzmittel/"> but in this case it should reference to https://www.myagrar.de/pflanzenschutzmittel/?page=2
  • Steps to reproduce:
    • Open above Links and look the Codecode
@a-laurowski
Copy link
Contributor

Hi @sja-dS
The issue has been already queued an we will look for possible solutions, i guess modyfing the page parameter in href with new number will be sufficient.

@a-laurowski
Copy link
Contributor

hi @sja-dS Is page parameter the only one we should take into account? What about different parameters that also manipulates the content of the page like sorting or filtering?

@sja-dS
Copy link
Author

sja-dS commented Aug 30, 2021

Hey @a-laurowski
I sent the question to our Customer, what would the best for him and send you the answer as soon as I get them.

@sja-dS
Copy link
Author

sja-dS commented Aug 31, 2021

Hey @a-laurowski
I got some Feedback from our Marketing Department.
The page Parameter would be sufficent.

@a-laurowski
Copy link
Contributor

hi @sja-dS

Please check the following PR if its suitable for you #338

My concern is that according to an article https://www.searchenginejournal.com/technical-seo/url-parameter-handling/#close any parameter which changes page content should be contained in the canonical link. I think this is something we need to discuss internally.

The goal of the module is always to provide the best flexibility and perhaps we should consider a mechanism which allows user to at least select which kind of parameters (paging, sort order, filters) should be applied in the canonical link

@sja-dS
Copy link
Author

sja-dS commented Sep 1, 2021

@a-laurowski
PR looks fine to me
A config which parameters should be used would be perfect.
I'm not a SEO Expert so i don't know what would be best Solution. So the Config would be the best and flexible Option, I think

@a-laurowski
Copy link
Contributor

hi @sja-dS
With current amount of work in other areas than Magento2 module i'm afraid i can't tell the exact date. I think the end of September is a realistic scenario of next release but things may have changed.

For the time being, if you need this functionality, please add it to one of yours template. It could be placed anywhere in the DOM (after.body.start block in my opinion is good place), the most important thing is that it has to be wrapped inside the ffReady event listener if you want to be sure a given callback is successfully registered.

@a-laurowski
Copy link
Contributor

Hi @sja-dS

We have some new thoughts on this problem.
First we need to take into consideration that when you interact with the product listing all actions done by Web Components are asynchronous.

We think that the only case to cover is to provide correct link only on initial rendering of the page, further asynchronous actions like changing page or filtering are irrelevant.

As a proof of this way of intuition you can check the page source. It looks that dynamical changes on the canonical link are not contained there and page source is more or less this what web crawlers will see during their visit.
So from our point of view it is important for this link to be formed yet on the server side. And because dynamical changes does not impact the page source and because the web crawlers will not perform any asynchronous filtering, page changing or anything like that, a dynamical changes on the canonical link is pointless

@sja-dS
Copy link
Author

sja-dS commented Sep 13, 2021

Hey @a-laurowski
Sorry for the late answer. I understand your point. I send this reply to our SEO experts and give you Feedback.
I'm not SEO Expert enough to give you an answer to rely on ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants