Sequential Logic

Where software engineering meets online marketing


Aweber Hosted Thank-You Page Url GET Parameters

Since I could not find this anywhere on the web, here are the variable names that Aweber sends to a self-hosted thank-you page, when “Forward subscriber information to your thank you page” is turned on for a web form:

[custom_phone_number] => 4445551234
[custom_us_address_(city)] => SomeCity
[custom_us_address_(state)] => CA
[custom_us_address_(street_1)] => 1234 Main Street
[custom_us_address_(zip_code)] => 91234
[email] => test@testaddress.com
[from] => test@testaddress.com
[listname] => listnamehere
[meta_adtracking] => my_test_web_form
[meta_message] => 1
[meta_required] => name,email
[meta_split_id] =>
[meta_tooltip] =>
[meta_web_form_id] => 2099111234
[name] => Test User
[submit] => Submit

I used their U.S. Address functionality, and then added a custom field named ‘phone number’.

No Comments

Simple non-U.S. visitor redirect for your affiliate landing pages

Even with proper geo-targeting set up for your campaigns, search engines and ad networks will sometimes send you traffic from countries you did not request. In that case, it’s probably better for you to redirect them to an appropriate offer that takes traffic from their country. If you let the affiliate network do the redirecting, you run the risk of the visitor getting redirected to Webfetti, or some other offer unrelated to the visitor’s initial click.

I have a basic non-U.S. visitor redirect system in place.

First, you need to get GeoIP set up on your server, which I detail in my post MaxMind GeoLite Country and GeoLite City Made Easy

Once that is set up and running properly, follow these 2 steps:

1) Download my GeoIPFunctions.php file and put it in your GeoIP folder on your server.

Be sure to change the parameter on line 6 to match your server setup.

2) At the top of your PHP landing page, put this code:

  1. <?php
  2. require_once('/PATH/TO/YOUR/GEOIP/FILES/GeoIPFunctions.php');
  3. RedirectNonUS('URL of your Non U.S. affiliate offer');
  4. ?>

Again, make sure the path in the require_once matches the path to your GeoIP files.

Now when non U.S. based visitors come to your landing page, you can send them to another offer that accepts non U.S. traffic.

This system is very simplistic, and a setup that forwards any individual country’s visitors on to a specific URL would be a better solution, but I’ll leave that for later.

1 Comment

Invalid clicks on Facebook and account credited

Over the last couple weeks, I’ve run a few test campaigns on Facebook Ads. I was disappointed to see that about half the clicks Facebook said I got were not recorded by my Tracking202 installation. I thought maybe it was a problem with the speed of the server the Tracking202 software was on (a somewhat cheesy shared server), and decided to look into it later.

Yesterday, I came across the TechCrunch article about people on Wickedfire being up in arms about large amounts of invalid clicks, and was relieved to find out that others saw the issue, and Facebook was on to solving it.

Today, in my Facebook Ads Manager account, I got the following message:

“Recently, we have detected an increase in invalid clicks on Facebook. Your account was impacted and as a result, we are crediting your account. Your credit has been automatically deposited into your Facebook account and will apply toward future advertising campaigns. Your credits expire December 15, 2009.”

The amount they credited me was about 75% of what I felt were “missing” clicks, so I’m pretty happy that they were close to the same number on their side. I’m sure as they fine-tune their invalid click detectors, that number will be closer to true.

3 Comments

Do Link Injection Techniques Help With Search Engine Ranking?

I’ve discovered an Alexa top 2000, PR8 (front page) e-commerce site that is vulnerable to search box link injection techniques. Do these techniques still carry any weight with search engines, or have their algorithms completely discounted, if not punished, them? I’ve got an experiment going, and I’ll let you know the results in 6-8 weeks.

Update: The #83 Alexa rated site has a search box that is vulnerable to link injection.

Update 2: I used a social bookmarking service to bookmark the vulnerable pages, pointing to one of our affiliate sites. I’ll collect ranking data now, and 6-8 weeks from now to see if there is any measurable lift from having links to the page that “links” to our site.

No Comments

MaxMind GeoLite Country and GeoLite City Made Easy

Some consumers are up in arms because that fake blog they read by someone who just happens to be from the same city they live in, turns out to be a bit phony. They’re surprised to find out that a piece of software is behind the trick, which does a GeoIP lookup on their IP address, and then uses that within the text of the splog, or ad, making the reader feel a bit more of a connection to the ad copy.

Even before these splogs popped up, I had been interested in GeoIP lookup techniques for Google Maps mashup purposes, but the splog trick finally made me figure out how it was done.

DISCLAIMER: I don’t condone the use of these techniques for deceptive advertising techniques. At best, they are disingenuous, and at worst, may be illegal, according to the FTC. Like The Force, this technique can be used for good or evil. Which path you choose is up to you.

MaxMind has a paid GeoIP City database service that costs $370 up front and $90 a month for database updates, which they advertise as 99.8% accurate in determining location from IP address. However, they also make a free database available, that is 99.5% accurate. We’ll cover the free version since the accuracy difference is negligible for our purposes.

The crucial information is spread out over four pages on the MaxMind site:

APIs for GeoIP products
GeoLite Country information
GeoLite City information
and our API of choice, the GeoIP PHP API

It should be noted that the GeoIP PHP API has three methods of being implemented, each being more efficient with webserver resources than the previous: a pure PHP module, a PECL module that allows you to embed the GeoIP C Library inside PHP, and mod_geoip, an Apache module that you can access via PHP. Since our needs are fairly minimal, we’ll go with the easiest to implement, the pure PHP module, which requires no PHP or Apache changes.

1) Download the following PHP files from MaxMind: geoipcity.inc, geoip.inc, and geoipregionvars.php .

2) Download the latest GeoLite City Binary Format file, which is updated on the 1st of each month, and gunzip it.

3) Put all of those files in their own directory somewhere on your webserver, and for this example, we’ll name the directory GeoIP.

4) Put the following code in a web-accessible PHP page, changing the PATH/TO parts to match your setup, and view the page in a web browser:

  1. <?php
  2. require_once('/PATH/TO/GeoIP/geoipcity.inc');
  3. $gi = geoip_open('/PATH/TO/GeoIP/GeoLiteCity.dat', GEOIP_STANDARD);
  4. $location = GeoIP_record_by_addr($gi, $_SERVER['REMOTE_ADDR']);
  5. geoip_close($gi);
  6.  
  7. echo '<pre>';
  8. print_r($location);
  9. echo '</pre>';
  10. ?>
  11.  
  12. I believe you are in <?php echo $location->city ?>, <?php echo $location->region ?>

The database says I’m in Los Angeles when in fact we’re in Mission Viejo (Orange County), which isn’t a huge deal, but shows the possible slight inaccuracy in IP->location lookup.

One thing this could benefit from is a quick state abbreviation to full state name conversion function, so the text would be “Los Angeles, California” instead of “Los Angeles, CA”. I think the full spelling looks more natural in some instances. I’ve uploaded a PHP state abbreviation to state name conversion function for your use.

Update: Danger Brown steals the show for GeoIP made REALLY easy. He’s got a two line javascript snippet that does the same thing, but is reliant on the MaxMind servers each time the script is called. My experience with using javascript that is resident on outside servers is that it works great until it doesn’t. One day your site will be slow or completely down because the outside javascript is failing to load. Some well crafted code can mitigate the risk, but I prefer to have all executing code on my server. Except for Google Analytics, because I tend to be no match for their servers.

Update 2: I’ve uploaded my modified geoipcity.inc that includes the abbreviation to state/province function, with ON->Ontario included, and the call to that function in GeoIP_record_by_addr. Note that I could have also put the $record->region_name = Abbreviation_GetStateName($record->region); code within the _get_record function, but I chose to put it in the higher-level GeoIP_record_by_addr function.

Update 3: SEOcracy.com has a post about a very simple way to use the Google javascript API to do geolocation

29 Comments

Viddler Set Thumbnail API Script

Update: This method was always a bit hit and miss. It appears that Viddler has incorporated some “set thumbnail” functionality, see the comment below from Viddler’s Rob Sandie for more details.

If you need to set the thumbnails for your Viddler videos, I’ve created a quick and _dirty_ script that will allow you to do that via the Viddler API.

Here are the steps to get this working:

1) Get a Viddler API Key by going to http://www.viddler.com/YOUR_VIDDLER_USERNAME/settings/account/

2) Download and install the Viddler PHP wrapper from GitHub

3) Currently, phpviddler does not implement the setThumbnail function, so I’ve created one. Download my setThumbnail function and insert it into the phpviddler.php file you got from GitHub. I put mine just below the setPermalink function.

4) Download my ViddlerSetThumbnail script, rename it to a .php extension, and install it somewhere on your server that is web accessible.

WARNING! If you place this file on your server in a location that is not password protected, anyone who comes upon it in their web browser will be able to change the thumbnails of your videos. Please keep security in mind when using this script.

5) Change the _USERNAME_, _PASSWORD_, and _API_KEY_ defines to those of your Viddler account.

6) If necessary, change the require_once to match where your phpviddler.php file is,

7) Visit the ViddlerSetThumbnail.php script in your web browser, i.e. http://www.YOURSITE.com/PATH/TO/ViddlerSetThumbnail.php

8) The page will load up all the videos in your Viddler account. Below each thumbnail is an input box that lets you set where the thumbnail will be, in seconds, in the video.

9) When a thumbnail is changed, the resulting page will show the thumbnails as returned from Viddler. ALMOST ALWAYS, the thumbnails will be the same as before, as there seems to be a delay for Viddler to process the thumbnail change. DON’T CLICK REFRESH on this page, as it will resubmit the thumbnail change request each time you do. Not a terrible thing, but probably not what you intended. Insted, simply click the “Back to video list” link at the bottom of the page, and refresh every few minutes. You should see that video’s thumbnail change after a few minutes.

2 Comments

Keywords AJmain and GGmain showing up in Tracking202 data

I’ve been using Prosper202 to track keyword searches and performance for some affiliate marketing experiments we’re doing. It’s a very nice product, with a lot of information available on which keywords people search for before clicking on your ads. It takes a fair amount of setup, but once in place, the information that can be gathered is very useful for fine-tuning Pay Per Click campaigns. Prosper202 is self-hosted and open-source, but they also have a hosted solution with even more bells and whistles at Tracking202 Pro.

One issue that has popped up is that I have been seeing the keyword AJmain show up in searches from MyWebSearch.com for one of my campaigns, and couldn’t figure out what it was. I put a negative campaign keyword in for it, but after seeing it again in my tracking data, I dug into it a little bit more.

The incoming link looks something like this:

http://search.mywebsearch.com/mywebsearch/AJmain.jhtml?qid=0fba4305452cb2a61dc1c57dbc92633e&pg=AJmain&ord=20&action=click&p=AJmain&tpr=jrel4&ptnrS=ZUxdm523YYUS&searchfor=KEY+WORD+HERE&si=&ct=RR&st=kwd&ss=sub&cb=ZU

Notice that there is a ‘p’ parameter, which it turns out Tracking202 is using to get the keyword, as some search engines pass the keyword in that parameter. Not so for MyWebSearch.com; they use the ‘searchfor’ parameter to carry the keyword that was searched by the user.

The URL-parsing code is in three different files, and I’ve posted a bug report/possible fix in the Tracking202 forum. Take a look there for more specifics. I’ll update if and when the developers get back on the report.

Update: Keyword GGmain from MyWebSearch.com shows up too, with the same issue. The link looks like:

http://search.mywebsearch.com/mywebsearch/GGmain.jhtml?qid=aee506c433e0ba6ae18155ac1557a2c6&pg=GGmain&ord=20&action=click&p=GGmain&tpr=sugrs&ptnrS=ZKxbn045TQUS&searchfor=KEY+WORD+HERE&si=&ct=RR&st=hp&ss=sub&cb=ZK

6 Comments

Mac Mail doesn’t like PHPMailer’s AddEmbeddedImage function

Note to PHPMailer users: If Mac Mail is showing blank email bodies, and won’t open an attachment, use AddAttachment() instead of AddEmbeddedImage().

2 Comments

Bucking the “Green” trend, I never turn off my PCs

Eweek magazine is the latest to jump on the “Green Issue” trend this month (enough already). Within it are the numbers I have been looking for to justify the very ungreen practice I have of never shutting off my computers. As a CTO and software guy, I am at my computer throughout the day and night, and I can never stand to wait through the 2-3 minute boot time so I can do a quick check of whatever information I need at the moment. It seems that many corporations are frowning at this practice, installing software on their computers to shut them off each night, or after certain periods of inactivity. Eweek says “…the savings can be significant…you can save anywhere from $25 to $75 per PC per year by using the power management features on your PC.”

Let’s run the numbers, shall we? We’ll take the high side, at $75 and compare that to the time wasted waiting for the PC to boot. Best case, we’ll say it takes 2 minutes to be completely up and running, with all required software up and running also. At 50 weeks per year (2 off for vacation), that $75 savings is a break even point for an employee that gets paid … wait for it … $9 an hour; that is, if the employee makes more than $9 an hour, the two minutes they waste each day waiting for the PC to boot costs you more than $75 a year. It doesn’t take a rocket scientist to see that turning off the computer makes no business sense. Does it “save the earth’s resources” by using less electricity? Of course. Does it make any kind of economic sense? Of course not. However, idling the processor when not in use makes sense, but shutting down the machine entirely does not.

A mentor engineer of mine at my first job showed me how many of these “save a little here, save a little there” types of decisions make no sense, especially in high-tech companies. I remember his point about getting the engineering managers to not be so cheap, and buy the engineers a new computer every once in a while. We wrote our code in C, so we were constantly running compile cycles. He demonstrated that if a faster computer, over all your compile cycles that day, saved you just 10 minutes a day, for a $75k engineer, that works out to be a $1,562.50 savings for the entire year. Hence, a brand new $1200 computer once a year could be a savings to the company. Imagine that.

It pays to run the numbers on all the silly cost savings corporations try to push down the ladder. They’re better off spending some money and getting down to business.

2 Comments

Heat, tribute to Bullitt

I just finished watching the movie Bullitt on DVD. What a great movie, best known for it’s “one of cinema’s best car chase” scene. This swingin’ 60′s movie has a great jazzy soundtrack, and is peppered with…one curse word…, when Steve McQueen, as Frank Bullitt, tells the dirty politician exactly what he thinks of him and his plans. It’s dramatic, and it stands out, as Frank tells him “Bulls**t”. Ahh, gone are the days of one-curse-word cop films, and plotlines that involve the bad guy carrying a loaded handgun in a shoulder rig onboard a San Francisco to Rome flight.

But I digress. While watching Bullitt, I almost leapt off the couch, never knowing the tribute that Michael Mann had made to Bullitt in one of my all-time favorite movies, Heat. See for yourself:

1968′s Bullitt

1995′s Heat

4 Comments