Read the Directions

I recently posted a job opening on oDesk (designer / developer job), and put a simple instruction in there. In the middle of the job description, I wrote:

Also, you must tell me what 4+3 is, so I know you’ve read this entire description.

It’s so easy now to weed out those applicants who just paste their cover letter without any regard as to what the job entails. oDesk even has a reason for rejection, which goes like: “Applicant ignored instructions in job description”. I used that a LOT when rejecting applicants for this job.

If you can’t follow this simple instruction, how do I expect you to follow instructions on real tasks that I assign you?

Geo-Targeting PHP Script

I spent a few minutes with Dr_Ngo and Neil Turner at Affiliate Summit, and we were talking about geo-targeting users. Pretty powerful stuff, if your landing page can say, “Find singles in Buffalo, NY” or something similar (whatever your offer is about).

The easy (but ghetto) way to do this to put the city & state in the query string. So it’d be like page.php?city=Buffalo&state=NY. Then in your code, you just echo the city and state variables, like < ?= htmlentities(stripslashes($_GET['city'])) ? >. But what if you just want 1 landing page, without using the query string? It’s actually pretty simple, and I’m going to walk you though it.

So first, you need a database. Here’s a good free one. So from your ssh line, you’ll want to get this database by typing:
wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

Cron this to run monthly (looks like they do updates on the 1st, so run your cron on the 5th or so) and then unzip it:
gunzip GeoLiteCity.dat.gz

OK, now you’re going to want to get the PHP module to use this data. From this directory, download

  • geoip.inc
  • geoipcity.inc
  • geoipregionvars.php

So in a single directory, you’ll have these 3 files and GeoLiteCity.dat. Now you’re about to see how unbelievably easy this script is:

include(”geoip.inc”);
include(”geoipcity.inc”);
include(”geoipregionvars.php”);

$gi = geoip_open(”./GeoLiteCity.dat”, GEOIP_STANDARD);

$rsGeoData = geoip_record_by_addr($gi, $_SERVER['REMOTE_ADDR']);

echo(”<pre>”);
print_r($rsGeoData);
echo(”</pre>”);

geoip_close($gi);

You’ll see I just do a print_r to show all the variables available to you, but for me, I see:

geoiprecord Object
(
[country_code] => US
[country_code3] => USA
[country_name] => United States
[region] => NY
[city] => Buffalo
[postal_code] => 14217
[latitude] => 42.9761
[longitude] => -78.8727
[area_code] => 716
[dma_code] => 514
)

So now your landing page will say, “Find singles in < ?= htmlentities($rsGeoData->city . “, ” . $rsGeoData->region) ? >”.

With the latitude & longitude, you can even show a map of the area using the Google Maps API. Having the Zip Code would be great for zip submit offers (only 2 1 left in 14217! - Enter your Zip Code to claim the prize!) or lots of other great ideas using a Zip Code database.

Beware of foreign IPs, though. If you’re not in the US, I don’t know what city or region will give back. You can replace $_SERVER['REMOTE_ADDR'] above with a known IP to see what it returns.

In case you were wondering, I started this installing this script at 3:40 and had it done at 3:50. It took me longer to write this blog post than it did to install the script, so don’t be afraid to try it yourself. If you have problems, though, just contact me.

Best Business Cards of Affiliate Summit

I had a big stack of business cards after returning from Affiliate Summit (but none from Steve Poland… oh wait, that’s right: he forgot his (isn’t that rule #1??)). Funny thing about business cards is that there IS a standard size, but my stack was full of cards of all sizes. Anyway, here are a few that stuck out in my mind:


Ah, Ashley Madison. We love to hate you. I chose this one not because of the card, but because of the potential. The kiss on the card got me thinking… they should’ve handed out cocktail napkins with the Ashley Madison name and number on it, either handwritten or mass-printed looking like handwriting, with a red lipstick kiss on there. There you go, Ashley Madison, that’s what I want to see next time (if I have to see you again).


This network ran with the baseball theme, including handing out baseball cards, instead of business cards. Stats on their top offers is on the back of the card, and they were handing out baseballs, too. They win the “theme” award (but next time, get the right texture of the card, not just the size!).


John Hasson’s card made me do a double-take. I really thought he forgot all his cards at home & handwrote this thing. I think the funny thing is that each side of the card says, “Flip me Over”. Reminds me of the card that on both sides says something like, “For hours of amusement, flip this card over”


Charles Ngo wins the Quality Award. Rounded corners and glossy texture are both nice touches.


My choice for Best Business Card of Affiliate Summit goes to Parked. Sorry I wrote on this before scanning it, but I’ve got some domains I may park with them. Maybe I should’ve used the “notes” section on the back. Anyway, this card looks like a parking ticket. I probably studied this card for 3 minutes when I first got it. Very cool

Someone else is going to have to take over this list for Vegas, as I can’t put myself on my own list, and my card in Vegas will be the one everyone’s talking about. A guaranteed winner ;)

Affiliate Summit East 2008 in Boston

I’ve been bad about keeping up my blog with my trip to Boston for Affiliate Summit. I did upload some photos, but not many.

Amongst the best thing about going to Affiliate Summit was all the great people I got to meet. One of the first people I met in Boston was Ron from 7 Days a Week Marketing, my mentor for this Summit. The mentor program was put together to help newbies get the most out of the conference. Although I’ve been to an Affiliate Summit before, I thought joining this program would still be a great help. So Saturday evening I met up with Ron at the Affiliate Dinner. I loved this dinner, as it was laid back, but not sponsored by a network with free booze. Big difference from the “networking events” where the booze flows freely (more on that later). I sat at a table full of agencies, which was fine with me.

Sunday morning I went on the CAMA Cruise. When I bought my ticket, I got 2, thinking Steve would join me. But then I found out that he wouldn’t be in town in time, so I thought to give Ron my extra ticket. But he already had one! So I got in touch with Ian Fernando and he took my extra ticket. Ian’s a cool guy and I’m glad we got to chat, although I think he’s used to more hoppin’ “networking events”. Oh, and I won a t-shirt while on the cruise. Not an iPod, but I’ll take it :)

Steve arrived Sunday morning, and thought it was a day off. Nope, sorry! Affiliate Summit starts! So we checked in and… well, I don’t know what Steve did, but I went to a few sessions. My first was John Hasson’s “Which PPC Engines Work and How?” John reminded me a lot of myself, which was encouraging. He’s a hardcore programmer, but has found success with PPC. “Coder gone marketer,” as John would say. I took some good notes, which I’ll review on the flight home.

Side story… so I’m sitting in the session & the guy behinds me asks a staff member for a pen. She can’t help. I get up to get some water, and notice a pile of Seaport Hotel pens there, so I grab one & give it to the guy. This guy turns out to be Charles Ngo, whom I’ve chatted with now & again online, but had never met in person. That’s one of the best parts about Affiliate Summit - meeting all these people that I see online every day.

Then I went to Leveraging Social Media, which I wasn’t too fond of. A lot about Twitter, but not much of anything else. Afterwards I went to a session on NY Tax Laws, which is a hot topic these days. The solution is so simple it’s almost funny: add some T&C to the merchant agreement, and don’t do direct PPC to merchants if you’re a NY affiliate. Works for me!

After these sessions was the meet market, which (as usual) was too crowded to get anything done. People, if you’re going to talk to someone, have the courtesy to step to the side. I met with a merchant whom I’ve been exchanging emails with, and we simply agreed to meet later during the conference.

Sunday night was the Share a Sale party, but I was beat. Since I wake up at 5AM every day, partying late into the night wasn’t going to happen. Jonathan Radande was looking for 2 tickets, and I happened to have 2, so I hooked him up. It was great meeting him, and even better that I could be of help.

Monday I woke up a bit after 5, but since Steve was rooming with me, I went back to sleep. We then went off to the conference. Sitting at breakfast, I noticed a guy at the table was from 11|15 Media. Turns out we’ve been “following” each other on Twitter for some time, and are working together in the Black Ink Project. Again, the face-to-face meetings are great!

The keynote Monday morning was given by Cory Booker, the mayor of Newark, NJ. What???? Yeah, that’s what I thought. However, the speech was very inspirational and even humorous at times. Mayor Booker is a great speaker. Blue Man Group introduced him, which I was a bit disappointed in… I thought they were going to be on stage longer than the 3-4 minutes that they were.

I won’t go into details about the sessions. I attended “Content that Kills”, “Anatomy of a Great Affiliate Program” and “PPC Super Affiliate Strategies You Must Know”. Steve wasn’t having a good time and left lunch to… I don’t know. That’s OK, though, as John Hasson sat down in his spot :) I got to talk to John a bit, and we headed over to the first afternoon session together.

Monday night was Linkshare’s party, which I had passes to, but again was too tired to make it. I checked out the bar online, and realized with the rain, it would have been very crowded (and loud, and in a bar - 3 strikes in my book). By this time, Steve had switched his flight & headed home. This conference isn’t for him. So I stayed in & watched the Olympics.

Tuesday was the last day of Affiliate Summit, which was full of sessions. I attended “Web 2.0 for Affiliates”, “International Options for US Affiliates” and finally “Ethical Issues in Affiliate Marketing”. I met up with Dr_Ngo again on Tuesday and got to chat with Neil Turner for a bit. All these guys are so easy to talk to. I know everywhere you read about networking says to just start a conversation, it’s true. I was only blown off once (by Shawn of Affiliate Summit) but he was rushing off and I approached him again later in the day and he took some time to talk to me.

Let’s see… of course John Chow was there taking pictures of his dinner and filming just about everything, I saw Jonathan Volk walking around, and ran into Matt Wood a few times. I heard Jeremy Palmer was around, but didn’t see him. Too bad, I wanted to share with him the progress of my Black Ink site (which I’m SUPER excited about and can’t wait to get it launched sometime this month).

I’ve already bought my ticket to ASW in Vegas (as its a steal to buy it during this conference) and booked the hotel room (so many people complained they couldn’t get into the hotel were the conference is held at… tip: BOOK EARLY!). Even if I don’t go, I can easily cancel the hotel and sell the ticket to someone else.

So now I’m debating where to get some dinner, and will start getting my stuff together. Tomorrow I’ll slowly make my way to the airport, where I’ll overpay for dinner and sit around & read until my flight leaves. Flights from Boston to Buffalo aren’t that convenient. Oh well, at least I’ll be home soon!

Zip Code Database

I just got word that the ZipCodeGuy is giving away his Zip Code Database for free! Zip Code databases are great when you’re targeting regional offers, such as gas prices, dating, or practically any zip submit offer. With this database, you can do tons of things, like lookup nearby cities and show singles that are there (well, not really, but the user doesn’t need to know that when they’re signing up) or their photos on a zip code map of the region (using Google Maps API).

If you’re lazy, combine this with an IP database and you have some pretty powerful info on your hands. Or scrape, I mean, reference city-data.com and show all sorts of info!

Even if you have no plans to use it, download the zip code database while you can!

iFrame a Link & Still Track Conversions

@IamJustinM asked the other day

Is it even possible to track visitors and conversions when you have the landing page in an iframe??? Can’t figure it out….

I gave a quick answer, “at top of iframe page, write tracking data to db, then get unique id and use that as your sid w/ the network” but wanted to show it a bit more in detail. So I took 5 minutes I whipped up this quick script:


<?php
    
// http://yourdomain.com/iframe.php?cSource=google&q=my+keyword

    mysql_connect(’server’, ‘username’, ‘password’);
    
mysql_select_db(‘databasename’);

    $cTable = ‘iframetrack’;
    
/*
    CREATE TABLE `iframetrack` (
        `nID` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
        `cSource` VARCHAR( 20 ) NOT NULL ,
        `cKeyword` VARCHAR( 200 ) NOT NULL ,
        `cBrowser` VARCHAR( 200 ) NOT NULL ,
        `nIP` VARCHAR( 16 ) NOT NULL ,
        `tsDatetime` DATETIME NOT NULL
    ) ENGINE = MYISAM ;
    */

    if (empty($_GET['q'])) {

        list(, $cRefererQS) = explode(‘?’, $_SERVER['HTTP_REFERER'], 2);
        
parse_str($cRefererQS, $_RefererGET);

        $_GET['q'] = $_RefererGET['q'];
    }
// ends if (empty($_GET['q']))

    $cQuery = “insert into $cTable (cSource, cKeyword, cBrowser, nIP, tsDatetime) values (’” . mysql_real_escape_string(stripslashes($_GET['cSource'])) . “‘, ‘” . mysql_real_escape_string(stripslashes($_GET['q'])) . “‘, ‘” . mysql_real_escape_string(stripslashes($_SERVER['HTTP_USER_AGENT'])) . “‘, ‘” . mysql_real_escape_string(stripslashes($_SERVER['REMOTE_ADDR'])) . “‘, now())”;

    mysql_query($cQuery);
    
$nID = mysql_insert_id();

    $cAffLink = ‘http://www.cpaclicks.com/redirect.asp?a=2429&b=27673&d=0&l=0&o=’ . $nID . ‘&p=0′;

?><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html lang=”UTF-8″>
<head>
<title>Title</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<meta http-equiv=”Content-Language” content=”UTF-8″ />
</head>

<body style=”padding:0px; margin:0px;”>
    <iframe name=”mainsp” id=”mainsp” src=”<?= $cAffLink ?>” width=”100%” height=”100%” scrolling=”auto” frameborder=”0″>
          <p><a href=”<?= $cAffLink ?>“>Click to continue.</a></p>
      </iframe>
</body>

</html>

Now it’s probably not perfect, but it gives you a way to track this info. When you link to this iframe, set cSource to the source of the visitor (can be just the source, or source & ad number combined - whatever) and (optionally) set “q” to the keyword. If you omit this, it’ll look at “q” from the HTTP_REFERER, which is what most search engines use for the keyword field.

I’m not going to go into detail on how to change things - if you need help, just ask.

PS - Sorry about the funky quotes - WordPress is being “smart”. Find / replace to fix it.