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
Refactored the SEO plugin to make it extensible and error-proof #7174
Conversation
…e and error-proof - SEO metrics are returned by `MetricsProvider` implementations - a new event `SEO.getMetricsProviders` allows other plugins to register `MetricsProvider` - errors while connecting to a 3rd party service are now logged as warning, and shown in the widget as `-` instead of the values.
@@ -0,0 +1,45 @@ | |||
<?php | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- piwik file headers missing in some of the new files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch ;)
Very nice refactor! It would be nice to create a new component for SEO metrics, feel free to do it quick if you like the idea :-) |
OK! |
By the way, by OK I meant I'll look into it later but not in this PR especially since we need it for 2.11 ;) So ready to be merged if all OK? |
Looks good, I'll test it on demo2 and demo! |
Refactored the SEO plugin to make it extensible and error-proof
-
instead of the valuesSEO.getMetricsProviders
allows other plugins to registerMetricsProvider
Also kinda related to #4172: as I said there I think we could move our implementations (that are now more decoupled) into a new Piwik "SEO" component.