Posts Tagged ‘IP’

Metrics in Conversational and Community Marketing

September 20th, 2008 by smp | Comments | Filed in Blogging, The Web, Web Performance, advertising

There is clear dissatisfaction with the current state of marketing among the social media mavens.

So what can be done? Jeff Jarvis points out that the problem lies with measurement. I agree, as there is only value in a system where all of the people involved agree on what the metric of record will be, and how it can be validly captured.

Currently CPM is the agreed upon metric. In a feed based online world, how does a CPM model work? And, most importantly, why would I continue to place your ads on my site if all your doing is advertising to people based on the words on the page, rather than who is looking at the page and how often that page is looked at.

In effect, advertisers should be the ones thrying to figure out how to get into the community, get into the conversation. As an advertiser, don’t you want to be where the action is? But how do you find an engaged audience in an online world that makes a sand castle on the beach in a hurricane look stable?

The challenge for advertisers is to be able to find the active communities and conversations effectively. The challenge for content creators and communities is to understand the value of their conversations, the interactions that people who visit the site have with the content.

In effect, a social media advertising model turns the current model on its head. Site owners and community creators gain the benefit of being attractive to advertisers because of the community, not because of the content. And site owners who understand who visits their site, what content most engages them, how they interact with the system will be able to reap the greatest rewards by selling their community as a marketable entity.

And Steven Hodson rounds out the week’s think on communities by throwing out the subversive idea that communities are not always free (as in ‘beer’, not as in ‘land of’). If a community has paid for the privilege of coming together to participate in communal events and discussions, then can’t that become an area for site owners to further control the cost of advertising on their site?

While the benefit of reduced or no marketing content is the benefit of many for-pay communities, this benefit can be used by site owners by saying that an advertiser can have access to the for-pay community at the cost of higher ad rates and smaller ads. The free community is a completely different set of rules, but there are also areas in the free community that are of higher value than others.

In summary, the current model is broken. But there is no way to measure the value of a Twitter stream, a FriendFeed conversation, a Disqus thread, or a Digg rampage. And until there is, we are stuck with an ad model that based on the words on the page, and not the community that created the words.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Hit Tracking with PHP and MySQL

September 3rd, 2008 by smp | Comments | Filed in Technology

Recently there was an outage at a hit-tracking vendor I was using to track the hits on my externally hosted blog, leaving me with a gap in my visitor data several hours long. While this was an inconvenience for me, I realized that this could be mission critical failure to an online business reliant on this data.

To resolve this, I used the PHP HTTP environment variables and the built-in function for converting IP addresses to IP numbers to create my own hit-tracker. It is a rudimentary tracking tool, but it provides me with the basic information I need to track visitors.

To begin, I wrote a simple PHP script to insert tracking data into a MySQL database. How do you do that? You use the gd features in PHP to draw an image, and insert the data into the database.


header ("Content-type: image/png");

include("dbconnect_logger.php");
$logtime = date("YmdHis");
$ipquery = sprintf("%u",ip2long($_SERVER['REMOTE_ADDR']));

        $query2 = "INSERT into logger.blog_log values \
               ($logtime,$ipquery,'$HTTP_USER_AGENT','$HTTP_REFERER')";
        mysql_query($query2) or die("Log Insert Failed");

mysql_close($link);

$im = @ImageCreate (1, 1)
or die ("Cannot Initialize new GD image stream");
$background_color = ImageColorAllocate ($im, 224, 234, 234);
$text_color = ImageColorAllocate ($im, 233, 14, 91);

// imageline ($im,$x1,$y1,$x2,$y2,$text_color);
imageline ($im,0,0,1,2,$text_color);
imageline ($im,1,0,0,2,$text_color);

ImagePng ($im);
?>

Next, I created the database table.


DROP TABLE IF EXISTS `blog_log`;
CREATE TABLE `blog_log` (
  `date` timestamp NOT NULL default '0000-00-00 00:00:00',
  `ip_num` double NOT NULL default '0',
  `uagent` varchar(200) default NULL,
  `visited_page` varchar(200) NOT NULL default '',
  UNIQUE KEY `date` (`date`,`ip_num`,`visited_page`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

It’s done. I can now log any request I want using this embedded tracker.

Data should begin flowing to your database immediately. This sample snippet of code will allow you to pull data for a selected day and list each individual hit.


$query1 = "SELECT
                bl.ip_num,
                DATE_FORMAT(bl.date,'%d/%b/%Y %H:%i:%s') AS NEW_DATE,
                bl.uagent,
                bl.visited_page
        FROM blog_log bl
        WHERE
                DATE_FORMAT(bl.date,'%Y%m%d') ='$YMD'
		and uagent not REGEXP '(.*bot.*|.*crawl.*|.*spider.*|^-$|.*slurp.*|.*walker.*|.*lwp.*|.*teoma.*|.*aggregator.*|.*reader.*|.*libwww.*)'
        ORDER BY bl.date ASC";

print "<table border=\"1\">\n";
print "<tr><td>IP</td><td>DATE</td><td>USER-AGENT</td><td>PAGE VIEWED</td></tr>";
while ($row = mysql_fetch_array($result1)) {
        $visitor = long2ip($row[ip_num]);
        print "<tr><td>$visitor</td><td nowrap>$row[NEW_DATE]</td><td nowrap>$row[uagent]</td><td>";

	if ($row[visited_page] == ""){
    	    print " --- </td></tr>\n";
	} else {
    	    print "<a href=\"$row[visited_page]\" target=\_blank\">$row[visited_page]</a></td></tr>\n";
	}

}

mysql_close($link);

And that’s it. A few lines of code and you’re done. With a little tweaking, you can integrate the IP number data with a number of Geographic IP databases available for purchase to track by country and ISP, and using graphics applications for PHP, you can add graphs.

For my own purposes, this is an extension of the Geographic IP database I created a number of years ago. This application extracts IP address information from the five IP registrars, and inserts it into a database. Using the log data collected by the tracking bug above and the lookup capabilities of the Geographic IP database, I can quickly track which countries and ISP drive the most visitors to my site, and use this for general interest purposes, as well as the ability to isolate any malicious visitors to the site.

Tags: , , , , , , , , , , , , , ,

You know you have reached middle age when…

March 9th, 2008 by smp | Comments | Filed in Life, RANTING

You hear a song off Bob Mould’s album Workbook used in a TIAA-CREF commercial.

I think I’ll just nip off and shoot myself.

Tags: , , , , , , ,

The music of Iceland

February 3rd, 2008 by smp | Comments | Filed in Life

I don’t often (ever) talk about my musical taste. It is unremarkable for the most part, with flights into madness and impulsiveness.

Lately, I have discovered Icelandic music. Mainly Sigur Ros, Mum, Apparat Organ Quartet, Aniima, and (of course) Bjork. Apparently Icelandic music is all the rage, with people trying to understand how such a small country can produce such a wide range of artists.

These artists provide a soothing background to my jangled, often confused, mental state. I played it as I slept while I was on my latest trip, and while I was on the plane returning from Chicago.

However, my deep feelings and desire to visit Iceland has its roots back in my very early teens. A Hardy Boys mystery and a Clive Cussler novel brought it to my attention. It’s a nation of extremes, of wonder, isolation, and survival.

It is among one of the few places I feel I have to visit at least once in my life. I cannot explain this desire. Perhaps it is the latent Viking in me.

But the music draws me as much as the place does.

Tags: , , , , , , , , , , , , , , , , , ,

7 Hours at Sea-Tac on New years Eve

December 29th, 2007 by smp | Comments | Filed in Life

So, on New Years Eve, due to the vagaries of modern air travel, the family will be spending seven hours at Sea-Tac waiting for the second leg of our trip home.

For me, this is usually not an issue, as I can huddle up in a corner with my wireless connection and while away the hours with work and general interest. However, we will be a one laptop family, and my children need to be entertained.

Likely at least an hour of the trip will be handled by immigration as they subject us to the joys of entry with our Advanced Parole documents. It’s now harder for us to get into the US via air as late process Green Card applicants than it is if we were simply visiting the country.

After that, who knows.

Does anyone out there in blog land have any great suggestions for entertaining a family for seven hours at an airport?

Tags: , , , , , , , , , , , , , , , , ,

So you think you’re getting a better deal…

December 17th, 2007 by smp | Comments | Filed in Immigration

Landed in the US on a one-day business trip today. The family is enjoying Christmas with the grandparents in Victoria, BC, and I need to work remotely to cover the time.

I flew into Seattle for a one-day trip, with my brand-new Advanced Parole documents. Figured it would be speedy.

90 minutes later, they let someone who has gone through a number of security checks and other body scans into the US.

Have to wonder what people from other countries have to go through.

Technorati Tags: , , , ,

Tags: , , , , , , , , , , , , , ,

The best times on a business trip…

November 3rd, 2007 by smp | Comments | Filed in Life

Part of the problem with making a lot of East to West trips across the US is that the flights back are a nightmare for timing. You either lose most of a day or have to take a red-eye.

Well, taking the red-eye has only one advantage: you get to camp in the airline lounge and get some work done that you have been too tired/jetlagged to deal with.

I am in the United Red Carpet Lounge. It is 18:33 PDT, and my flight boards at 22:00 PDT. I have been here since 15:00 PDT. I have caught up with a client project, completed my (dreaded) weekly timesheet, booked accommodation for my Columbus, OH trip, and tidied up an analysis script that I use to process client measurement data.

Seems odd that this is the most productive time of the week.

This trip is a 48-hour turnaround from Boston to LA to finish up the project for a large client. The first half was handled by some colleagues, and was detailed here.

Then,when I get home, I have to go to NYC (Long Island City actually) for the day on Monday. And, as I mentioned above, Columbus which is set for the middle of the month.

Compared to some jet-setters out there, this is nothing. But I travelled so much between August 15 and November 15 that I went from 2,000 miles on United to well into Premier (24,000+ miles). This trip makes the fourth cross-country trip in 2.5 months. Not bad for a homebody.

I have three more hours. Think I will sit back and watch Trois Couleurs: Blanc.

Tags: , , , , , , , , , , , , , , , , , ,

Travelling with Bill

October 22nd, 2007 by smp | Comments | Filed in Life, Work

My colleague Roger went on his first business road trip last week.

It was from hell. He spent some time detailing the whole hellish experience here.

On November 14-15, I am travelling with Roger to Columbus, OH. I have promised to make it a much more…enjoyable experience.

Technorati Tags: , , ,

Tags: , , , , , , , , ,

GSM Phones are my weakness…

September 27th, 2007 by smp | Comments | Filed in RANTING, Technology

I have a problem: I like to collect GSM phones. Right now, I have seven.

"Hi, my name is Stephen, and I have a problem"

From left to right.

  • MOTORAZR V3
  • MOTORIZR Z3
  • MOTOSLVR L7i (current phone in use)
  • Motorola V188 (running V220 software)
  • Sony Ericsson K700i
  • Nokia of some description
  • Samsung T619

Ugh.

Tags: , , , , , , , , , , , , ,

Where there’s smoke, there’s poor fireplace design

September 20th, 2007 by smp | Comments | Filed in Life

The boys wanted a fire last night, so we fired up a pressed log, and all was well.

This morning, Samantha prepared the fireplace for a repeat tonight. We kept smelling the remnants of last nights fire smoldering, so we just lit the thing.

Guess the logs were lined up wrong.

Living Room full of smoke, billowing out the front of the fireplace.

I love home ownership.

Technorati Tags:

Tags: , , , , , , , ,