I just finished polishing my very first module intended to share as a Drupal contributed module. This is the documentation of the module:
Google rankings module gives you detailed statistics about the websites positions on Google results pages. This is achieved by analyzing HTTP referers headers set by Google web search.
There are two types of referes. The old referer format (google.com/search) carries information about the queriy string and the page number, the link was in. But the new referer format (google.com/url) besides the query string also contains information about the position of the link, on Google SERP. At the moment, about 25%-30% of the traffic sent by Google has the new referer format, and 70%-75% has the old format.
Dependencies:
This module relies on core Statistics module to be enabled and configured to collect access log information. If you are using a module (like Boost for example) or any other type of software configuration which breaks the anonymous usage statistics, than this module will not work.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | google_rankings.tar_.gz | 6.11 KB | edgarpe |
| #4 | google_rankings_demo1.png | 43.79 KB | edgarpe |
| #4 | google_rankings_demo2.png | 77.32 KB | edgarpe |
| #1 | google_rankings.tar_.gz | 6.62 KB | edgarpe |
Comments
Comment #1
edgarpe commentedAttached the modules initial version. I use this module already on 4 websites in production environments. Better project name suggestions are welcome.
Comment #2
edgarpe commentedI just realized, that trying and evaluating this module is pretty hard for the first time, because it needs a live website indexed by Google, and built up access log stats. So I created a demo site with imported stats from edgarpe.hu:
http://edgarpe.hu/google-rankings-demo/
user: demo
pass: GoogleRankings
Reattached the module because in the meantime I made a lot of minor improvements and typo fixing.
Comment #3
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site using the proposed theme; for modules, it should include also a comparison with the existing solutions.
Comment #4
edgarpe commentedHi kiamlaluno!
Thanks for reviewing my request. I would gladly provide detailed description of the proposed module:
Google Rankings module provides detailed stats about the websites rankings in Google search results pages. To build this data, the module analyzes the core statistics module's access log. In hook_cron() it processes the access_log database table and searches for visitors with http referers of google.com, google.co.uk, ... Access log entries are deleted after a while, but Google rankings will keep old information in its own DB table google_rankings.
Data processing and storing mentioned above is done in the background in hook_cron(). Using this data this module provides the detailed stats:
- traffic distribution across google domains.
- top search queries and its traffic volume in a daily or monthly period.
- distribution of target pages of top queries (sometimes one can rank for the same term but with different target pages)
- average position on SERP and average of results page number
- most used words in search queries listed by volume (aka. top words)
- target pages, also listed by search volume (aka. top pages)
- raw data of clicks from Google presented in a simple HTML sortable table with pager
To see how this module provides all these details above, please see the attached screenshot or the demo site linked in #2 comment.
Search Engine Referers module (http://drupal.org/project/search_engine_referers) have some similar goals as Google Rankings have. But SER does not provide any level of aggregated data like GR, nor does it gives you information about the specific position of your link on Google results page. GR can give you link position information by analyzing "google.com/url" type referers. More info about the new referer format:
http://www.blogstorm.co.uk/google-adds-ranking-data-to-referrer-string/
Please let me know if I can help you in any way about my project plan.
Comment #5
edgarpe commentedForgot to set status.
Comment #6
avpadernoThank you for your reply, and your comparison with the existing project.
So far, I am favorable to the proposed module.
As usual, I have to ask why you didn't open a feature request to add the missing features in the existing project, or to change the code to use the new referrer format. This doesn't mean the proposed module will not be accepted. We prefer collaboration over duplicating the work done in existing projects; depending on your answer, we can understand if it's the case to duplicate already done work, or not.
Comment #7
edgarpe commentedThank you for your help end support.
There are two main reasons why I did not tried to achieve the desired functionality by modifying Search Engine Referers module:
1) First and foremost Google provides a unique information with its google.com/url referer and cd= parameter, something that other search engines does not. While SER supports 4 mayor search engines, GR focuses on Google only but with a more in-depth info.
2) Google Rankings module does a lot of things in different ways compared to how Search Engine Referers does. SER works directly with the DB access_log table, while GR stores the relevant data in a slightly different format in its own table. This means GR will keep historic data, while SER does not. This also means SER reports are computational heavy, because the need to scan the entire access_log table on every request. Also SER does not provide any aggregated data just simple click tracking information, also because the lack of its own data table.
If you take a look at both SER and GR current code base it's hard to find any peace of code which could have been shared. So implementing into SER what is achieved in GR right now would have meant to basically take over that module.
Let me know if I can clarify anything else.
Comment #8
edgarpe commentedOK, I just realized that I have to set the status to "needs review" every time I comment in this issue. Hopefully won't forget next time :)
Comment #9
avpadernoThank you for your reply.
Comment #10
edgarpe commentedIs there anything else I can do to move this issue forward? I'd be happy to answer any question or clarify anything around my Google Rankings module.
Comment #11
edgarpe commentedI post again th link to the DEMO site because I made some changes in it:
http://edgarpe.hu/google-rankings-demo/
user: demo
pass: GoogleRankings
This is not a live site. I preloaded with old data from one of my websites to demonstrate how the stats pages are looking and what kind of data this module generates.
I'm really looking forward to share this module with the Drupal community. I'm waiting for over a month now :(
Comment #12
avpadernoI am assigning the issue to me to remind me I will review it on Sunday.
Comment #13
avpadernoThe code should be written as
Every control statement should be written on three lines, as per Drupal coding standards.
Avoid to escape the string delimiter, especially in strings passed to
t(); menu descriptions, and titles are passed tot()from Drupal core code.Thank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #14
edgarpe commentedThanks!
Comment #17
avpadernoComment #18
avpaderno