drupal

how to write a jquery script that rapidly increases the alexa rating of a drupal website

Finally I've taken a time and organized myself to make something that is supposed to increase my alexa pagerank.

Alexa rating is an important number that is often being looked at. For example tеxtlinkаds shows only two parameters to buyers - the PR of a page AND the alexa rating. nothing else! So we have to do something about it.

I have read a bunch of articles that advise to ask all your friends to install the alexa rating toolbar and ask them to visit your pages every day, so alexa records these visits and reflects that in numbers.

But it is a very ineffective way, as:

  • you may be in some niche that isn't connected with webmasters and internet at all, so your visitors may lack the knowledge how to write a comment, not speaking about installing the alexa toolbar for a firefox ("what's a firefox?" :)
  • even if they are, they will get tired of doing that, so that way is not lasting and eventually your alexa will go back down

That's why I guess alexa has made another way, which we need only to implement and the alexa rating will honestly report the real traffic on the site, thus boosting it up under 50000 in three weeks (that's what they say)

The redirection itself is pretty straightforward, for example, the link to this blog would look like http://redirect.alexa.com/redirect?http://www.vo1dmain.info

OK, then one could start and search-replace all his links, substituting them with the redirect links like that one. Fine, alexa rating boosts up, but.. You would lose all your google PR rating, because you will link to alexa from your every page several times each, thus making a great PR gift to to them :)

But we are not a charity organization, we will make it another way.

I have heard that there is a wordpress plugin that installs a pretty big javascript, which substitutes the real link with a redirect at the moment when user clicks it. Very elegant, because it's a clean way and everybody is happy.

This is exactly what I have done for Drupal, because there is no contributed module out there...

My final version of this javascript looks like this:

 

function alexa_click() {
  var link = this.href;
  if(link.indexOf("redirect")==-1)
  {
    link = "http://redirect.alexa.com/redirect?" + link;
    this.href=link;
  }
  return true;
}

function alexa_attach() {
  $('a').click(alexa_click);
}

if (Drupal.jsEnabled) {
  $(document).ready(alexa_attach);
}

Here is what it does: upon readiness of a page, it attaches itself to all links assigning it an alexa_click function. When any of them gets a click event, the javascript reads the link and prepends the alexa redirection. That's all! Effective and elegant.

A thing to mention - this script uses the built-into-drupal jQuery library, which is why the code snippet is so short. if you want to use it on any non-drupal site, you will need to download jQuery (40kb only!) and include it into your page.

After creating the script you save it somewhere in /misc among all other scripts and create a drupal php block which will contain only one line of code:

<?php
    drupal_add_js('misc/alexa.js');
?>

That's it!

Let's see how it'll work. Today it is the 19th of october and alexa rating of this a bit forgotten blog is 2.9mio. This my javascript was installed today, so I wonder how good is going to be the alexa number in november.

And of course I am still under the great impression of the VPS hosting I have moved to about a month ago. The speed and control are incredible! Read my whole review about my new VPS hosting here

Choosing the right VPS plan: Jaguar PC hosting, VPS review (VPS discovery plan)

A few words about hosting again, this time about JaguarPC

During last two years I have been jumping from one hosting company to another and actually I've got pretty tired of that. Through all this time my own personal development in the field of internet money making was actively progressing especially during last half a year, resulting in a very comfortable state, when the sites I am dealing with are finally able to pay for themselves, so I have decided that these sites can afford themselves something better.

Cyber Ultra Network was the best hosting so far and still is, their price/performance level was superb, so I am still recommending them to everybody who is searching for a good shared inexpensive hosting... It has a lot of features and still not expensive (3.95$/month)

As I needed more control and also perfect uptime (say, 99.99% a year), the idea of some good VPS hosting was always flying above me, so during last three months I was actively researching this area of internet.

That wasn't an easy task - the market is full of VPS hosting providers!

Another thing is that I had no idea what kind of difficulties I could ran into after I would transfer my sites to VPS, but man, sooner or later it had to happen! So after a lot of research there was a winner

And the winner was the JaguarPC Hosting Company and their VPS discovery plan.

They are affordable, they had mostly good recommendations and what I liked the most, they have their own helping community! This is the only web hosting company I have seen, that has this feature.

The last drop for me was the promotion they had for the last week of august, which I almost missed, there was only two days left but yes, that has really made the final drop.

Originally for the price 19.97$ per month you get fully managed service, 10Gb of space on hard drive, 150Gb bandwidth, 128Mb RAM and 100% uptime guarantee.

The promotional package was a "little" better: 192Mb RAM, 20 Gb HDD and two free months. Impressive? I thought so too, so I decided to try and if something goes wrong they have 30 days moneyback guarantee.

First two weeks I was playing a bit here and there, trying the shiny new VPS, exploring plesk panel and checking whether I could do at least the same I could do in my shared hosting account.

The overall impression is like you own your own server somewhere there on the other side of the world (I live in Europe). You can do whatever you like and nobody on the same physical server hosted together with your account can influence you either by memory, bandwidth or even processor. The response time comparing with shared hosting is superb. Database speed is unbelievable. I am hosting a number of Drupal sites including this one and I can say they are flying now!

By default JaguarPC gives you 3 dedicated IPS, and you can do anything with them! Typically one IP is for hosting and the other two are for your own private name servers. That was something new for me. With the private name servers you can do any DNS operations including setting all DNS records (A, MX, etc) and even changing their life time, very useful when you plan some big change!

That is the power, I personally think that I can not live without anymore!..

I have moved all my sites to this VPS hosting and so far the functionality, quality and also support team were very good. If I exclude the downtime caused by my own lack of DNS knowledge the sites have had 100% uptime.

If you liked this VPS review and want to try yourself in "god mode" :) My recommendations!. You'll definitely like it!

Updated. They have a promotion again! It is even better than the package I currently have. It includes: 25 GB diskspace, 300 MB bandwidth, double guaranteed RAM (256 MB) for -10% of price ($17.97 /month), (I am talking about beginner's package, there are more). The promotion expires pretty soon, so try it now, especially if you're new to VPS! (Use JaguarPC coupon code "VPS10YRS")

Please feel free to ask questions, as the person who has learned something a month ago will answer them more enthusiastically than the one that had been using VPS for years! :)

Enhancing the drupal statistics: ip geolocation

Drupal statistics logs every access to a page. It is kind-of useful when the user is logged in, but there are times when you want to see where the user physically comes from. For this situation you can just go into "details" and see his ip address. Copy and paste it into some kind of online ip2location service and see the results.

This code allows you to shorten that cycle to just one click.  read more »

Powered by Drupal - Design by artinet