iamseo.org
Just another (SEO) Wordpress weblog
Just another (SEO) Wordpress weblog
Jan 31st
Are you getting the most out of your subscriber signup forms?
I’m starting some new campaigns and wanted to get as much info as possible on my subscribers.
Here’s what I was after:
By recording the referring URL and monitoring user’s interaction with my newsletters, I can find out which pages or search phrases send the highest-converting traffic.
<?php $referer = $_SERVER['HTTP_REFERER']; echo $referer; ?>
I believe there are more advanced ways of doing this, including using cookies to record the original referrer (this code will only show the last page accessed, unfortunately), but this is plenty in my case.
Freelancers will be pushing traffic to one of my signup forms on a CPA agreement. Monitoring IPs won’t be the greatest way to stop scammers, but it’s a quick and free solution without having to install any software.
This one’s fairly simple and will also help us capture the location in the next step.
<?php $IP = $_SERVER['REMOTE_ADDR']; echo $IP; ?>
I’m promoting UK-only sites and this will help me segment the database to serve unique newsletter content accordingly.
There’s plenty of half-arsed tutorials on how to do this – including a solution where you upload an array of countries and their codes / IP ranges to a MySQL database and query them from there. This seemed like a fair bit of overkill to me and the vague instructions were beyond a coder at my level.
I was content with this solution found on the Tek-Tips forum.
// Create the country code key
<?php
$IP = $_SERVER['REMOTE_ADDR'];
$SSID = htmlentities(SID);
// If IP address exists
// Get country (and City) via api.hostip.info
if (!empty($IP)) {
$country=file_get_contents('http://api.hostip.info/get_html.php?ip='.$IP);
// Reformat the data returned (Keep only country and country abbr.
list ($_country) = explode ("\n", $country);
$_country = str_replace("Country: ", "", $_country);
} ?>
// Call your city and country info
<?php echo($country); ?> // Call City, Country
<?php echo($_country); ?>" // Call Country only
The ease of calling the API from hostip.info also means that you’re reliant on these guys keeping their database online, but I’m willing to bank on it for now.
So here’s all our code in one place. Basically, this uses all of the above functions and inputs them into fields that users won’t see because of the display:none style.
To capture these in your subscriber database (I use and recommend Campaign Monitor), simply create a custom field where you can point the data.
<form id="sub" action="http://site.com/" method="post">
<input type="text" name="name-field" id="name" value="Name..." onfocus="value=''"/>
<br />
<input type="text" name="email-field" id="email" value="Email..." onfocus="value=''"/>
<input type="text" name="referrer-field" id="Referrer" value="<?php $referer = $_SERVER["HTTP_REFERER"]; echo $referer; ?>" style="display:none" />
<?php
$IP = $_SERVER['REMOTE_ADDR'];
$SSID = htmlentities(SID);
// If IP address exists
// Get country (and City) via api.hostip.info
if (!empty($IP)) {
$country=file_get_contents('http://api.hostip.info/get_html.php?ip='.$IP);
// Reformat the data returned (Keep only country and country abbr.
list ($_country) = explode ("\n", $country);
$_country = str_replace("Country: ", "", $_country);
}
?>
<input type="text" name="IP-field" id="IP" value="<?php echo($IP); ?>" style="display:none" /> // this was created in the country code above, so we can call it here also
<input type="text" name="country-field" id="Location" value="<?php echo($country); ?>" style="display:none" />
<input type="submit" value="Join" id="button" /></p>
</form>
Enjoy! Let me know if you have any questions of troubles.
Dec 9th
This week I’ve been doing some SEO groundwork for a Hotel in Alaska while I am coding their hot new Wordpress theme.
The idea was to, first, know what I’m getting myself into and, secondly, devise a plan of how to improve their SEO.
After some research online I came across quite a few SEO templates, including this Pre SEO Report template from Thats SEO.
It’s very simple, but perfect for presenting to clients as an initial benchmark. Using Mac’s Pages I built a PDF document that also included the site’s top ten terms and their current rankings for Google and Yahoo!
I actually lost the black hat stuff, as I didn’t think that was neccesary, and instead included Alexa, Compete and Page Ranks.
No feedback as yet from the client, but I think this is going to be great in a few months when I can look back on the progress we’ve made.
I’m very confident with this client as it’s quite obvious what needs to be done, and there are plenty of sites in Alaska offering links. They’ve also got an awesome URL, which is a great start! I’ll keep you updated!
Oct 28th
Ten years since they paid far too much for it, Yahoo! has pulled Geocities this week.
What does that mean for SEOs? Mostly, it means there are TONNES of links waiting to be picked up. 850 million, in fact, says a group called Majestic SEO.
Here’s the concept: thousands of these Geocities pages have been taken down. The site you made at 12 with Michael Jackson midi files and Simpsons gifs: gone!
That leaves a whole lot of webmasters with links pointing to dead Geocities pages. Get those links.
Oct 22nd
There’s now a great plugin for this!
See WP No Category Base to download and install the plugin. It does all that the hack below does, but better, and instantly.
In fact, I did have some issues with the hack after upgrading Wordpress, so found this plugin instead.
So this one’s been a killer for a long time: you can hack Wordpress in several ways to remove /category/ from the URL, though pagination and all sorts of other nasty side-effects arise.
Anyway, it’s finally been done – you can now remove /category/ from Wordpress URLS, maintain pagination and everything else!
In fact, the fix even writes out /category/ when generating category links through get_the_category or single_cat_title: instead of just redirecting it afterwards as other hacks have done.
Oct 20th
A colleague recently forwarded this online intern opportunity for a student in media / communications or business / marketing studies.
As the document mentions, part of the role is utilising social media such as Facebook and Twitter, so I imagine most college students would have half the experience already – regardless of their discipline!
Having worked with online bingo sites for many years, I would highly recommend working with a company in the sweepstakes field – especially as an entry point to the digital industry.
Oct 1st
If you’ve found this, you’re no doubt up on SEO. Which means you’ve also probably got a tonne of old blog posts packed with juicy keywords?
Perhaps you’ve also found that your crawl rate is lower than it has been, and only a small portion of your site is indexed?
This was the case with Super Free Bingo – a site that I manage SEO strategies for. While our team spends a lot of time off-site generating new links, and creating new content on-site, all those great bingo stories that were written two years ago are were sitting unused and not indexed!
Sep 29th
If you haven’t heard of Automatic Backlinks yet, you’re missing out on one of the great new ways of gathering backlinks. Like many link-building platforms that have risen up of late, it’s about empowering webmasters to generate their own links in the simplest way. Read on for more!
Jun 13th
It seems I’m not the only one that has had issues with the Wordpress login page (wp-admin) reloading itself without logging in.
I made a post on the Wordpress support thread with my fix, though thought I should expand here. This may not fix the issue for all users, as the reloading might be the result of other problems or faulty plugins.
Jun 2nd
Sometimes it’s the absolute simplest questions that you have to dig around for online!
This had me stumped for five or ten minutes, until I saw a comment on the Bing Twitter.
The answer is msnbot.
To add msnbot to your robots.txt file, add the following:
User-agent: msnbot