
Graphic by Elliance – First sourced at Search Engine Land
Google Pagerank isn’t as useful a metric as it used to be, and on it’s own, has little to do with where you actually rank for a particular keyword. However, while Google themselves state it an indication of the reputation of a page, it is worth having a glance at the Toolbar Pagerank of a page Google publishes. Certainly, keeping an eye on your Toolbar Pagerank isn’t hard, and could indicate interesting events if it goes up, or down.
Marty and I spent 7 minutes and created a simple Pagerank monitor based on the same technology as our Google Webmaster Guidelines Monitor, which lots of people have found some value in.
The premise is simple. We’ll watch a sample of new urls and when they accrue Pagerank – the system will notify people via Twitter.
If you want to know EXACTLY when Google Toolbar Pagerank updates – this is the perhaps the fastest, and arguably simplest way to do it automatically:
*NOTE – I have primed the tool for the next pr update confirmation (expected in May 2013)
How To Create A Pagerank Checker Tool With Google Docs
Once logged into to Google / Apps
Visit your Google Drive : https://drive.google.com/
Step 1: Create a new document
Click on Create / Select Spreadsheet

Step 2: Give your Doc a name
Click on the untitled spreadsheet

Step 3: Give your Document a name
click OK to save.

Step 4: Setup titles and urls to check
Start adding a list of urls you want to check.

Step 5: Adding the Script
On the tool bar, click on Tools -> Script Manager

Step 6: Script Manager
When script manager appears, click on New

Step 7: Blank Project
From the selection choose, Blank Project

Step 8: Insert the code
Highlight the code and delete it so the document is blank
paste in this code;

Text file Source:
http://www.visiblecompany.com/wp-content/uploads/2012/04/prscript.txt
From this post:
http://www.visiblecompany.com/2012/04/pull-pagerank-data-into-google-docs/
/************************************************************\
* Call This - I do all the work...
\************************************************************/
function getpr(baseurl) {
url = baseurl.replace(/\?.*$/g,'?');
if (!stristr(url, "http") ){
url = "http://" + url + "/";
}
var reqgr = "info:" + url;
var reqgre = "info:" + URLencode(url);
var gch = GoogleCH(strord(reqgr));
var gch = "6" + GoogleNewCh(gch);
var query = "";
query += "http://toolbarqueries.google.com/tbr";
query += "?client=navclient-auto";
query += "&hl=en";
query += "&ch=" + gch ;
query += "&ie=UTF-8";
query += "&oe=UTF-8";
query += "&features=Rank";
query += "&q="+ reqgre ;
var str = UrlFetchApp.fetch(query);
str = str.getContentText();
var foo = str.match(/Rank_.*?:.*?:(\d+)/i);
var pagerank = (foo) ? foo[1] : "No Rank";
return pagerank;
}
/************************************************************\
* Hex
\************************************************************/
function hexdec(hex_string) {
hex_string = (hex_string+'').replace(/[^a-f0-9]/gi, '');
return parseInt(hex_string, 16);
}
/************************************************************\
* Count
\************************************************************/
function Gcount( mixed_var, mode ) {
var key, cnt = 0;
if( mode == 'COUNT_RECURSIVE' ) mode = 1;
if( mode != 1 ) mode = 0;
for (key in mixed_var){
cnt++;
if( mode==1 && mixed_var[key] && (mixed_var[key].constructor === Array || mixed_var[key].constructor === Object) ){
cnt += count(mixed_var[key], 1);
}
}
return cnt;
}
/************************************************************\
* Size
\************************************************************/
function sizeof( mixed_var, mode ) {
return Gcount( mixed_var, mode );
}
/************************************************************\
* CodePoint
\************************************************************/
function ord(string) {
return (string+'').charCodeAt(0);
}
/************************************************************\
* String Length
\************************************************************/
function strlen(string) {
var str = string+'';
var i = 0, chr = '', lgth = 0;
var getWholeChar = function (str, i) {
var code = str.charCodeAt(i);
var next = '', prev = '';
if (0xD800 <= code && code <= 0xDBFF) {
if (str.length <= (i+1)) { throw 'High surrogate without following low surrogate'; } next = str.charCodeAt(i+1); if (0xDC00 > next || next > 0xDFFF) {
throw 'High surrogate without following low surrogate';
}
return str[i]+str[i+1];
} else if (0xDC00 <= code && code <= 0xDFFF) { if (i === 0) { throw 'Low surrogate without preceding high surrogate'; } prev = str.charCodeAt(i-1); if (0xD800 > prev || prev > 0xDBFF) {
throw 'Low surrogate without preceding high surrogate';
}
return false;
}
return str[i];
};
for (i=0, lgth=0; i < str.length; i++) {
if ((chr = getWholeChar(str, i)) === false) {
continue;
}
lgth++;
}
return lgth;
}
/************************************************************\
* Sub String
\************************************************************/
function substr(f_string,f_start,f_length ) {
f_string += '';
if(f_start < 0) {
f_start += f_string.length;
}
if(f_length == undefined) {
f_length = f_string.length;
} else if(f_length < 0){
f_length += f_string.length;
} else {
f_length += f_start;
}
if(f_length < f_start) {
f_length = f_start;
}
return f_string.substring(f_start, f_length);
}
/************************************************************\
* String in String - I > 1);
a &= (~ z);
a |= 0x40000000;
a = (a >> (b - 1));
}
else {
a = (a >> b);
}
return a;
}
/************************************************************\
* Mix
\************************************************************/
function mix(a, b, c){
a -= b; a -= c; a ^= (zeroFill(c, 13));
b -= c; b -= a; b ^= (a << 8);
c -= a; c -= b; c ^= (zeroFill(b, 13));
a -= b; a -= c; a ^= (zeroFill(c, 12));
b -= c; b -= a; b ^= (a << 16);
c -= a; c -= b; c ^= (zeroFill(b, 5));
a -= b; a -= c; a ^= (zeroFill(c, 3));
b -= c; b -= a; b ^= (a << 10); c -= a; c -= b; c ^= (zeroFill(b, 15)); return new Array(a, b, c); } /************************************************************\ * Old G Hash \************************************************************/ function GoogleCH(url,length) { var init = 0xE6359A60; if (arguments.length == 1) length = url.length; var a = 0x9E3779B9; var b = 0x9E3779B9; var c = 0xE6359A60; var k = 0; var len = length; var mixo = new Array(); while(len >= 12)
{
a += (url[k+0] +(url[k+1]<<8) +(url[k+2]<<16) +(url[k+3]<<24));
b += (url[k+4] +(url[k+5]<<8) +(url[k+6]<<16) +(url[k+7]<<24));
c += (url[k+8] +(url[k+9]<<8) +(url[k+10]<<16)+(url[k+11]<<24));
mixo = mix(a,b,c);
a = mixo[0]; b = mixo[1]; c = mixo[2];
k += 12;
len -= 12;
}
c += length;
switch(len)
{
case 11:
c += url[k+10]<<24;
case 10:
c+=url[k+9]<<16;
case 9 :
c+=url[k+8]<<8;
case 8 :
b+=(url[k+7]<<24);
case 7 :
b+=(url[k+6]<<16);
case 6 :
b+=(url[k+5]<<8);
case 5 :
b+=(url[k+4]);
case 4 :
a+=(url[k+3]<<24);
case 3 :
a+=(url[k+2]<<16);
case 2 :
a+=(url[k+1]<<8);
case 1 :
a+=(url[k+0]);
}
mixo = mix(a,b,c);
if (mixo[2] < 0)
return (0x100000000 + mixo[2]);
else
return mixo[2];
}
/************************************************************\
* C32 to 8 Bit
\************************************************************/
function c32to8bit(arr32)
{
var arr8 = new Array();
for(i=0;i< arr32.length;i++)
{
for (bitOrder=i*4;bitOrder<=i*4+3;bitOrder++)
{
arr8[bitOrder]=arr32[i]&255;
arr32[i]=zeroFill(arr32[i], 8);
}
}
return arr8;
}
/************************************************************\
* Mod
\************************************************************/
function myfmod(x,y)
{
var i = Math.floor(x/y);
return (x - i*y);
}
/************************************************************\
* New G Hash
\************************************************************/
function GoogleNewCh(ch)
{
ch = (((ch/7) << 2) | ((myfmod(ch,13))&7));
prbuf = new Array();
prbuf[0] = ch;
for(i = 1; i < 20; i++) {
prbuf[i] = prbuf[i-1]-9;
}
ch = GoogleCH(c32to8bit(prbuf), 80);
return ch;
}
/************************************************************\
* String CodePoint
\************************************************************/
function strord(string){
var result = new Array();
for (i = 0; i < strlen(string); i++) {
result[i] = ord(string[i]);
}
return result;
}
/************************************************************\
* Get G Hash
\************************************************************/
function gethash(url) {
return GoogleCH(strord(url));
}
/************************************************************\
* URL Encode
\************************************************************/
function URLencode(sStr)
{
return encodeURIComponent(sStr).replace(/\+/g,"%2B").replace(/\//g,"%2F");
}
Step 9: Save Project
Save the script project as getPR

Step 10: Save and publish to your gallery

Step 11: Close code
when you close code view, go back to the spreadsheet,
If the script manager is still on screen click Reload,
if you closed it, click on Tools->Script manager you will see a list of all the scripts you have..
if you don’t see the list, click Reload again,

Step 12: Ready to start
With your list of URLS in col(A) and PR results in col(B) click into the first cell for the first url

Step 13: Run it
Type: =getpr(A2) then Enter
(A2) represents the first cell we want to take data from.

Step 14: Get Results
After you click enter you should see “thinking”

Then if everything went ok, you should see your results appear

Step 15: Copy it…
Now that the first url from the list is working, simply click & drag the corner of the cell downward to cover the other urls in the list, when you let go of the corner the other results should start to “think”
then results will be there…

Congrats you now have a free PageRank Checker tool that works (when you sign in.)…
You are supposed to be able to get alerted if this doc updates – but I’ve yet to see an alert actually working.



