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

FIXED: Amazon links did not contain og tags with the default user agent #155

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chadpav
Copy link

@chadpav chadpav commented Nov 13, 2021

Action

ADDED: 'userAgent' with a default value to preserve current behavior
ADDED: 'googleBotUserAgent' static which can be used to override the default
ADDED: unit tests for Amazon links and tested across several other major ecommerce sites

NOTE: Not only does this fix OG tags for amazon.com links but the pages are way smaller due to Amazon optimizing for google search indexing (huge performance boost for preview response times)

  • Made user agent a configurable property to optimize for some websites (Amazon was the driver for this)

- Added 'userAgent' with a default value to preserve current behavior
- Included the 'googleBotUserAgent' static which can be used to override the default
- Not only does it include OG tags but the pages are way smaller due to Amazon optimizing for google search indexing (huge performance boost to SLP)
- Added unit tests for Amazon links and tested across several other major ecommerce sites
@chadpav
Copy link
Author

chadpav commented Nov 13, 2021

@LeonardoCardoso I forked and made this change for my project. I'm getting better results with the google bot user agent across all sites but I left the default user agent in place so it doesn't change existing behavior.

I don't often contribute back so let me know if this was the right way to do it and I can update. Hope this helps.

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

Successfully merging this pull request may close these issues.

None yet

2 participants