All posts in Search Engine Optimization

PHP check a website’s Twitter mentions

I started experimenting with social signals as ranking factors in Search Engines; by social signals I mean the count of mentions a website has on a social network such as Facebook, Twitter, LinkedIn, StumbleUpon, Google+ and so forth. I correlated a lot of metrics using a spreadsheet, which was time consuming so I decided to write a script to do it for me. I am 80% complete with the entire script so I’m not going to publish it all, but rather just a taste of what I’m doing.

The code below, when executed on Apache, will crawl Topsy and return the number of times a chosen website has been mentioned on Twitter. This code needs to be run in conjunction with a form that passes a text field with the domain name, so you may have to code that up quickly or later the code to bypass the domain inclusion.

Here’s the code:

<?php

$domain_name = $_POST['domain'];
$domain_name = strtolower(trim($domain_name));

echo "Results for " . $domain_name . ":<br /><br />";

// build search queries
$topsy_twitter = 'http://topsy.com/s?q='.$domain_name;

// cURL contents of queries
$topsy_twitter_contents = grab_contents($topsy_twitter);

// Find match on Topsy for Twitter
if(preg_match('/Search results <strong>1<\/strong>-<strong>10<\/strong> out of (.*?) tweets/sim', $topsy_twitter_contents, $regs)){
    $indexed_pages = substr($regs[1], 0, stripos($regs[1], " "));
    $indexed_pages = strip_tags(str_replace(",","",$indexed_pages));
    echo "Twitter Mentions: " . $indexed_pages;
}else{
    echo "Twitter Mentions: 0";
}

function grab_contents($url){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}

?>

As I mentioned, I’ve adapted this to cover an assortment of social networks and am deciding whether I should compile it into an advanced WordPress Social Metrics Plugin.. watch this space.

Hot: Google Any Duration Search launched!

I’ve just spotted something new when performing a search on Google – you know how you can choose “Past hour”, “Past 24 hours”, “Past week”, “Past month”, “Past year” and so forth once you’ve performed a search? Well, Google’s rolled out even more real-time stuff where you can refine your search results in Short (0-4 min), Medium (4-20 min) or Long (20+ min).

I gave it a bash and it’s fantastic for finding breaking news, definitely something I’ll be using form now onwards.

This is another step towards showing search results in even more real-time than ever before. We all know Google’s making big changes and although this isn’t a big change, it’s a darn useful one for those of you who want to know what’s happening right this minute.

Interested in Google stuff, join the iMod Google+ Circle.

Search Engine alerts plugin for WordPress

I wrote some code the other day that I felt was rather useful for people who are either launching a website or testing changes on a website in terms of getting ranked. What I mean by this is that when you launch a new website, you might want to know when Google is going to index your website, or if you’re testing out new things on your website and want to know when Google’s been past to test the changes.

The code is really straight forward, but I wanted to share it anyway in case there’s someone out there who could make use of it or further its development:

<?php

$to = ""; // insert receiving email address
$from = ""; // insert sending email address
$body = "";
$bots = array('Googlebot', 'Yahoo', 'MSN'); //add the bots you want

foreach ($bots as $bot)
    {
        if (eregi($bot, $_SERVER['HTTP_USER_AGENT']))
        {
            $subject = "BOT DETECTED: " . $_SERVER['HTTP_USER_AGENT'];
            if (mail($to, $subject, $body, $from))
            {
                  // nudda
            }
        }
    }
?>

I then took the code and compiled it into a WordPress plugin with a couple options for those people who prefer not to delve around in code. You can download the pluggin by clicking here, simply extract it, upload it to /wp-content/plugins/, activate it and look for the options panel in WordPress to configure your settings.

I used it when launching a website a few weeks ago; the client wanted to know when his website was indexed, so I installed the plugin on the website and had full control over when Google was crawling his site. Needless to say, I was able to alert him almost immediately when his site was indexed – happy client.

There’s a more detailed writeup on the code here, if you’re interested.

Drop me a comment if you use it please!

Google Analytics on Android

If you’re a web stats junkie and an Android user then this application’s for you: Analytics Widget. Analytics Widget is a widget for your Android device that shows you your Google Analytics right on the home screen of your device.

The application was launched quite a while ago, August 2010, but as Android devices get more popular I felt I would feature it here. It’s free, it’s 557k in size and scores a 3.5/5, which isn’t too bad.

Here are some screenshots:

Click here to find out more.

Excellent Google+ Business Page launch strategy!

I’ve spoken about creating a Google Plus Page for your business before, in fact, I provided you with a step by step guide, so there’s no excuse not to have one. Now I want to tell you about a really great way to get that page rolling with content. Remember, Google’s search is the number one search engine and Google own Google+, so Google is going to rank Google+ information in their search engine and that’s all the rage at the moment for people who want to increase their organic traffic.

The idea is rather straight forward: we want to get new and fresh content onto your page – updating it yourself can take a lot of time, writing articles to share takes a huge amount of time and doesn’t guarantee you that anyone will even add your business page to their circles. Like we’ve seen with blogging and websites before, crowd sourcing content is hugely popular, it results in a ton of fresh content that you don’t even write yourself, someone else does and that’s exactly what we’re going to look at today.

So here’s the idea:

Hold a Q&A session on your Google+ Page. That’s it! Okay, so there’s a little more to it, but that’s the premise. If you’re an expert in your industry, which you should be if you’re running a company, then why not send a message out to your customers/clients, colleagues and followers telling them that between 13h00 and 14h00 you’ll be doing a questions and answers session on your Google+ Page – tell them they’re welcome to come by and ask any questions they might have. If you can get just 10 people across to the page, just imagine how much fresh content through discussions will be created – think about it, it’s an hour of your time which will bring you more content than a few weeks of writing fresh articles.

I’ve tried and tested such a theory with some friends and the results have been great. Remember to tag people in your questions and create discussion amongst others so you aren’t doing all the answering yourself, that’s another way to spike that content without technically being involved.

Take my word, this method will add a great jump start to your venture into dominating yet another place on Google’s Search Result Pages.

Business owners, get that Google+ Page going

Google has announced that it will be combining social and search – what this means is that when you perform a search on Google, you’ll see two sets of results, those normal top 10 organic results, but also results based on your connections; by connections, I’m referring to your Google+ circles that you’ve built up.

I wrote a post about creating a Google+ page and I’ve received some great feedback from readers, so I wanted to take this a little further and share some of the things I’ve picked up since Google announced the combination.

Google+ is not really any different to Twitter or Facebook in the sense that building an audience is important, an audience shows credibility, trust and leadership, so the same applies for Google+ – grow your circles. The easiest way to grow your circles is to place a Google +1 button on your website (http://www.google.com/webmasters/+1/button/), this allows people to automatically add you to their circles. As a side tip, I’ve seen a lot of the big news websites doing clever things like encouraging readers to join their circle on posts that are related to any topic around Google – The same applies for posts about Twitter or Facebook, if you think about it, someone who’s reading a post on Twitter, for example, would be more inclined to follow you on Twitter than like your Facebook page, so be clever, encourage your audience to “join” your social networks relative to the content they are reading.

Of course, one of the most important things about your Google+ page is to ensure that you have a plan of action, that you’ve thought about the content you want to produce and share, and that you have a long term goal that you head towards. Like any form of search engine optimization, when it comes to writing content, make sure your content is unique, make sure it’s carefully thought out and communicated in a manner that might attract other Google+ users to share your content – this really is the powerful part, getting people to share your content (along with a good SEO strategy) and you will find yourself dominating the SERPs once again because you’ll have organic search and social search covered.

Something I’ve started looking at is the different types of circles you can create and thus group people together. Just like Twitter lists, in Google+ you can create your circles, fill them up with relevant people and then engage with the different circles with content that would probably interest them – this segmentation of users is highly effective.

It’s really important to recognize what Google is doing, how they are shaping things and how to keep up to date with all their changes.

Please feel free to add iMod to your circles by clicking here: https://plus.google.com/b/107825047085291830888/

How much does SEO cost? [infographic]

And another lovely infographic, click to enlarge:

Get more traffic from people who tweet your links!

Having a TWEET button on your blog posts is an excellent way to get people to share your posts with their followers and this has proven to be one of the best methods available for attracting new visitors. I’ve setup an Advanced Segment in Analytics for many websites that I’ve worked on to determine which social streams (Facebook, Twitter, LinkedIn, Google+) bring in the most traffic and so forth, and Twitter definitely leads on the properties I manage.

For those of you who aren’t familiar, a TWEET button is a button that once clicked, allows you to send a blog post out to your followers, so if you’ve found a blog post you like and you want to tweet it to your followers, the TWEET button will do all the work for you. This is what I’m talking about:

Now, there’s one step further that you can take – At the moment the person sends a tweet out as and when the TWEET button is clicked, but what if you could ensure that the tweet they send out is sent out a the best possible time on that person’s account? What I mean is, every Twitter account has certain times throughout the day that are best for sending out tweets that get seen by the most eyeballs. Well, I have a cool trick for this!

Lately I’ve been raving about Buffer; Buffer makes your life easier with a smarter way to schedule tweets. Work out all your tweets at one point in time during the day. Then fill up your Buffer with your tweets and Buffer schedules them for you. Simply keep that Buffer topped up and you will then be tweeting consistently all day round, all week long.

Buffer have released a Buffer button (yes, what an incredible idea, wish I thought of it), much like the Twitter button above, you click the Buffer button, the blog post is added to your buffer and scheduled for delivery at an ideal time. For the user it stands them more chance of sending out the great article they’ve found at a time which might get them more ReTweets, and to the website owner, it means their blog post link will be sent out at a time that it will get more clicks – it really is a win win scenario and as a website owner you’re doing very little and the other person is doing all the work for you.

I think it’s brilliant and we should all be placing a Buffer button on our website!

Busy week so far!

After Sunday afternoon’s stress, Monday started on an exhausted note, but a meeting and some tight deadlines worked just as well as a few strong coffee’s, and before I knew it I was racing through the day and on my way home. Last night was busy for some reason, I arrived home and just had lists of things to get through. I was sitting outside on my Mac researching some new SEO tactics that I want to test – completely lost track of the time and it was passed 2am! Today was busy too, I’m fairly hands on with a new staff member that is going to take over quite a bit of the work I have been doing up until now so it’s important for me to put the hours in to ensure that he feels comfortable, motivated and most important, passionate.

I had another salsa class this evening, good grief it was hot, wow! We learnt a really easy move, which wasn’t the best, but it was great to be back again, moving to the salsa beats and meeting new people. If you missed it, I’ve gone back to salsa, you can read about that here.

Looks like the weather’s not really going to change much, so prepare yourself for many more hot days:

Oh, and I have to end on this, dare I say that what Matt says below is something I’ve been preaching for years and years – ranking means nothing compared to converting! Sure, ranking highly normally results in more traffic (depending on the search term’s estimate traffic of course), but there’s no point getting thousands of hits to a site if they’re not converting. Take a watch:

Nicely said Matt!

 

Creating a Google Plus page

The other day I was reading a blog and went on to read the comments where someone wrote, “What is Google Plus?”. I had a good chuckle and I must admit, I haven’t too active on Google Plus and I’ve hardly explored the platform, well, that was until last week when I started to realise just how important Google Plus was. See, MySpace arrived and everyone had an account, LinkedIn arrived and everyone had an account, Facebook arrived and everyone had an account, Twitter arrived and everyone had an account, About.me arrived and everyone had an account.. so the list goes on, so the management gets more and more involved, so the free time vanishes. Then Google rolled out Google Plus, people jumped on because Google has Klout, but there wasn’t anything really exciting enough to keep people plugged in – I do believe that I don’t speak alone on this.

Well, things are changing and Google Plus might not be for everyone, but if you’ve got a website or sell a service online or anything to that nature the tables are about to turn. Remember when Google started showing Twitter and Facebook stuff in the search results? You might not, but they certainly did, I can’t help but think that this was purely a trial to see what social search was capable of, and this further fueled Google to put together Google Plus, remove Twitter and Facebook (to an extent) and start including Google Plus discussions in the search results – doesn’t take rocket science to really see the plan here.

So, Google’s the search giant and people want current information these days, so what better than for Google to include Google Plus conversations in the results? I mean, Google then starts to dominate the search market even more and takes a big chunk of real-time search with them – brilliant.

But what does that mean for topics like SEO? I’m not going to attempt to answer this in detail purely because it’s been answered here by Rand Fishkin, Joost de Valk, Marcus Taylor, Aaron Wall and Jorg Ruis, who are all industry leaders with excellent insight. Instead, I’m going to tell you that now is a really good time to get yourself a Google Plus Page for your business, just think, if you create that page and get some great content onto it, you’ll have an edge over your competitors for a good while – of course, there’s a strategy for creating good content and you might have to hire an SEO to assist you with aligning your Google goodies – organic SEO stuff, Google Places, Google Plus Page, etc as they can all work so beautifully together and I’d recommend doing that, but you can at least make a start and I’m going to assist you in doing so:

  1. To start creating a Google Plus page you need to navigate to http://plus.google.com/pages/create in your browser.
  2. Select a category which best describes your business: local business or place, product or brand, company, institution or organization, arts entertainment or sports and finally other.
  3. Fill in the information that appears in the form on the right as accurately as possible (remember, Google loves the truth, don’t try cheat the system).
  4. Click the CREATE button
  5. Your page will be created, you can now add a tagline and profile photograph (or logo).
  6. Share your page with your circles if you wish
  7. Click FINISH

7 easy steps and you’ll have a Google Plus Page, fresh and ready for new content that will start being indexed by Google any day now and this is how you’re going to get ahead of your competitors.

This is really the direction in which things are moving at the moment in my opinion, I’d jump on and get going right away :)