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

Meeting Facebook Ads’ Landing Page Requirements

I’ve been experimenting with the Facebook Ads platform a bit, seeing what they will approve, how much traffic costs, and how well it converts. As with most subjects, jumping in and experimenting teaches you a great deal of things, in a very rapid fashion. I highly recommend this method, as long as you have an acceptable daily budget in place.

Thinking I was a clever chap, I thought I’d try some hyper-targeted ads to dating services, with headlines like “29 and single in L.A.?” and target 29 year old people in the Los Angeles area. Facebook quickly came back with a Disapproved for the ad, and encouraged me to abide by their targeting rules for dating ads, in Section 10.

As an aside, the headline of the ad they let me create initially was “29 and Single in LA?”, which to the observant reader is not Los Angeles, but rather Louisiana, because they have a rule against not allowing two punctuation marks in a row, specifically the .? I wanted to end the ad with. Bummer.

After following all the targeting requirements, my ads were still getting disapproved. I sent an email to the Ads support address, and about a day later, they responded that the landing page was not targeted, meaning, the page was not specifically for 29 year old people in Los Angeles. Bored with all their requirements, I wandered off to find trouble in other places.

Fast forward a week, and I’m presented with this ad on Facebook:

Class of 1991 Ad

Yes, the lovely Mullet Family, in all their glory, calling to me, a Class of 1991 high school graduate. From previous Internet experience, I guessed this to be a Classmates.com ad, but thought “Wait a minute, how can they do that, Classmates.com is not all about the Class of 1991, is Facebook giving them preferential treatment?”, until I clicked on the ad:

Class of 1991 Landing Page

The landing page IS targeted to the Class of 1991, URL and all. Clever. It seems that all it takes to make Facebook happy is a few bucks for a targeted domain name, and a terrible looking, but highly targeted landing page. So what I need is 29AndSingleInLosAngeles.com, and a picture of a 29′ish looking person on my landing page. I’ll give that a try and report back on my level of success.

Update 1: FAIL, my first shot at creating an ad for the landing page was Disapproved, because Facebook Ads policy states “The ad text may not mention any user attribute such as age, gender or location unless it is directly relevant to the offer.” I’ll create a more generic ad that goes to the highly targeted landing page and see how that goes.

Update 2: A few weeks ago, I noticed Facebook ads with my age and location in both the headline and the ad text. I have also had ads approved with the user’s age in the headline, and the user’s age, location (U.S. state) and gender in the ad body. Once I get some CTR data on how this type of targeting performs, I’ll post again here.

1 Comment

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

How the new Fast Company social network logo was made

It’s interesting to see that the new Fast Company social networking feature is using the open-source package Drupal to power it.

Fast Company uses Drupal

Their logo is a bit unoriginal though. Being familiar with Linux, Drupal, and the other open-source CMS packages, I quickly recognized it as a mashup of some other logos. Here’s the steps it took to make the new logo:

Step 1: Take the logo from competing open-source CMS package Joomla:

Step 1 - Joomla

Step 2: Rotate it counter-clockwise 90 degrees:

Rotate counter-clockwise 90 degrees

Step 3: Cross-pollinate it with the Ubuntu Linux logo:

Ubuntu Linux logo

Step 4: Some minor tweaking of shade and positioning, and ta-daa!, new logo:

New Fast Company logo

Update:In the comments, reader “bloggo@bloggo.com” notes “The logo to which you are referring was created when Fast Company debuted their original reader’s network, the Company of Friends, in November 1997. Unless those other logos are almost 11 years old, most likely they copied Fast Company, or else it’s a coincidence.” The earliest link I can find in the Wayback Machine shows this logo as of July 5, 2003, so I’ll assume they are correct about the 1997 creation date (screenshot below). Thanks for setting us straight.

Company of Friends

1 Comment

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