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

Plugin for SEO piwik: alexa, google pagerank, incoming links #5520

Closed
anonymous-matomo-user opened this issue Feb 6, 2008 · 19 comments
Closed
Labels
Critical Indicates the severity of an issue is very critical and the issue has a very high priority. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@anonymous-matomo-user
Copy link

Plugin to display general statistics about the site SEO:
- Google Pagerank, Alexa, Compete,
- number of incoming links on google, yahoo, live. Page from google/yahoo fetched in php, grep for the number of links; maybe php library exists to do this

  1. SEO PLUGIN

see #1459 for the new ticket

  1. (old) SEO widget proposal

Widget would be really simple, providing a form for URL customizable below, like the feedburner widget. URL would be auto-completed with main website URL.

Widget would display the 3 ranks + 3 number of incoming links.

Plugin would expose the alexarank, google pagerank, all other data in the API.

Optionally, results could be cached for days in the db so that lookup is fast.

See [15 Tools for Monitoring a Websites Popularity](http://sixrevisions.com/tools/tools_monitoring_website_popularity/)

@anonymous-matomo-user
Copy link
Author

Hello matt ..
I definitely agree with the need for SEO rankings on the piwik plugin.
As part of a study I am looking into, I have developed a plugin that almost fully satisfied this requirement and would like to contribute it to the piwik base.

Its attached .. Please look at it and give me feedback.
(Currently it fetches alexa rankings and backlinks. )

Thanks,
Victor Dibia.

@mattab
Copy link
Member

mattab commented May 9, 2010

Thanks Victor, very good start!! Here is the feedback

  • there is some useless code here and there in the plugin (controller.index, controller.boolToString,
  • the API should return a datatable rather than strings
  • the widget should be built by calling the API, fetching the datatable, and then building the HTML
  • you can reuse the loading-blue.gif from the piwik core
  • is the functions.class.php and rank.class.php open source GPL compatible code?
  • can you also add the following metrics:
    • google pagerank
    • compete rank
    • yahoo backlinks

What do you think? let me know when you want me to do another code review. I think this plugin can be included in Core, as long as all code is open source :)

@anonymous-matomo-user
Copy link
Author

Attachment: This Plugin extracts and displays Google Ragerank, Alexa web ranking as well as backlinks of the currently selected website. Users are also able to check rankings of any websites by providing the appropriate url.
SEOPlugin.2.zip

@anonymous-matomo-user
Copy link
Author

Dear Matt,

I have included uploaded the reviewed code and make changes as suggested in your initial review.

  • useless code exterminated
  • datatable used in place of strings
  • widget built by calling api, datatable and building html
  • loading-blue.gif reused from core
  • code used (as indicated in source files) are gpl compatible, and all code is open source!
  • page rank added, yahoo backlinks added
  • screen shot included too!

There are a few issues though
-A checksum value is required to compute the Google PR value. The method used in computing this checksum value changes at googles discretion meaning this plugin will have to be updated with such changes (part of the reason why it was not included initially).
-Obtaining google backlinks needs an api key (obtained at http://code.google.com/apis/ajaxsearch/key.html) and works per website. Thus it is not included for now.
Thanks for the initial code review, and I look forward to the next (and any other advice).

Victor Dibia

@anonymous-matomo-user
Copy link
Author

Attachment: Screenshot of Piwik SEO Plugin.
seoplugin.jpg

@mattab
Copy link
Member

mattab commented Jun 17, 2010

Great stuff!

I just have little feedback

  • Maybe we can display logo in front of each metric? (similarly to http://www.webrankstats.com/webstats/piwik.org ) Logos could be in SEOPlugin/images/ (icons for Google alexa and yahoo can be found in Referers/images/searchEngines/ already).
  • when adding the widget on the dashboard, the API is executed. The widget loads a bit slowly. Instead, could you just load the INPUT field and trigger the ajax request, exactly like when you type a new URL?
  • Are altavista and all the web really relevant? it seems only Yahoo! gives a more accurate numbers (the others seem way off)
  • can you also please remove the author name and replace with Piwik (like other core plugins). Of course we will credit you on the page: http://piwik.org/the-piwik-team/ and we will also credit you in the changelog :)
  • What do you think about the metrics 'Indexed pages'? this might be interesting to have, for Yahoo/Google/Bing.

In the future, I could see this plugin being executed during archiving. We could then have a report with a graph at the top, and sparklines for each metric. You could see how the alexa rank, page rank, indexed pages evolve over time... this would be sweet!

@anonymous-matomo-user
Copy link
Author

Attachment: This Plugin extracts and displays Google Ragerank, Alexa web ranking as well as backlinks and pages indexed of the currently selected website. Users are also able to check rankings of any websites by providing the appropriate url.
SEOPlugin.zip

@mattab
Copy link
Member

mattab commented Jun 25, 2010

(In [2381]) Fixes #5520
Committing v1 of SEO plugin, thanks Victor Dibia for your work!

  • Renamed plugin to SEO (instead of SEOPlugin)
  • uses Piwik_Http instead of doing curl manipulations
  • removed number_format calls (this will be handled by Piwik in the future)
  • moved functions.php into the class as protected members
  • renamed few classes and cleaned code according to Piwik coding guidelines
  • added check for permissions in API call
  • added icons
  • i18n
  • cleaned up pagerank lib so it works when php displays NOTICE

Also

  • Fixing i18n Example feedburner plugin
  • adding unit tests to getPrettyTimeFromSeconds

@mattab
Copy link
Member

mattab commented Jun 25, 2010

(In [2382]) Enable SEO plugin by default refs #5520

@halfdan
Copy link
Member

halfdan commented Jun 25, 2010

The SEO plugins RankChecker uses heaps of ereg_* calls which are deprecated in 5.3 and later - this is throwing notices.

Notice: Use of undefined constant E_EXCEPTION - assumed 'E_EXCEPTION' in C:\Users\halfdan\Documents\NetBeansProjects\Piwik\core\Log\Error.php on line 105
Call Stack
#   Time    Memory  Function    Location
1   0.0006  341440  {main}( )   ..\index.php:0
2   0.2337  6068288 Piwik_FrontController->dispatch( )  ..\index.php:59
3   0.2404  6238768 call_user_func_array ( )    ..\FrontController.php:126
4   0.2404  6238904 Piwik_SEO_Controller->getRank( )    ..\FrontController.php:0
5   0.2427  6285104 Piwik_SEO_API->getRank( )   ..\Controller.php:21
6   18.6542 6471712 Piwik_SEO_RankChecker->getAge( )    ..\API.php:62
7   18.6542 6472264 Piwik_ErrorHandler( )   ..\ErrorHandler.php:0
8   18.6544 6474304 Piwik_Log_Error->logEvent( )    ..\ErrorHandler.php:51
9   18.6544 6474768 Piwik_Log->log( )   ..\Error.php:54
10  18.6545 6475344 Zend_Log_Writer_Abstract->write( )  ..\Log.php:113
11  18.6545 6475344 Zend_Log_Writer_Stream->_write( )   ..\Abstract.php:77
12  18.6545 6475344 Piwik_Log_Error_Formatter_ScreenFormatter->format( )

@halfdan
Copy link
Member

halfdan commented Jun 25, 2010

RankChecker.php is totally PHP4 code - ereg_*, "var" keyword no visibility attributes for functions. Copy/Pasting this class without refactoring it was not that good of a idea.

@mattab
Copy link
Member

mattab commented Jun 25, 2010

I already did many modifications to the class, I missed the 5.3 compat. I don't have 5.3 avail on my dev box, do you mind submitting patch? Thanks :)

@halfdan
Copy link
Member

halfdan commented Jun 26, 2010

Can do that. Will take a couple of days though as it needs some testing which I can't do right now. Will add it asap.

@halfdan
Copy link
Member

halfdan commented Jun 27, 2010

Attachment brings RankChecker up to PHP5 compatibility (removing all the ereg_* crap). I also found a "bug" which I did not fix.

When requesting SEO info for another page (using the input field) the result shows the URL urlencoded.

@halfdan
Copy link
Member

halfdan commented Jun 27, 2010

Attachment:
SEOplugin.patch

@halfdan
Copy link
Member

halfdan commented Jun 27, 2010

Attachment:
SEOplugin-bug.png

@mattab
Copy link
Member

mattab commented Jun 29, 2010

(In [2396]) Refs #5520

  • php5 compatibility thanks halfdan for patch!
  • fixing issue URL double encoded

@mattab
Copy link
Member

mattab commented Jun 30, 2010

(In [2401]) Refs #5520 Click on Rank or press enter now submit forms + adding JS

@mattab
Copy link
Member

mattab commented Jul 3, 2010

SEO PLUGIN

see #1459 for the new ticket

@anonymous-matomo-user anonymous-matomo-user added this to the Future releases milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical Indicates the severity of an issue is very critical and the issue has a very high priority. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants