Disabling Controls on a Brightcove Video

At last, we figured out how to disable the playback controls on a Brightcove video. It was far from easy to figure out, but it IS possible to do in a few simple steps.

Why Disable Playback Controls?

Why would you want to turn off the play/pause options on a video and disable the scrubber at the bottom?

Well in my case, we often put up sales pages online and a) don’t want folks skipping to the end of the video and b) have tightly controlled timing of things like when the Add to Cart button pops up.

With other players (JW Player, FlowPlayer, EZS3, Easy Video Player and MORE) you can easily disable the controls. Continue reading “Disabling Controls on a Brightcove Video”

Integrating Infusionsoft Links with WordPress

Wouldn’t it be cool if your landing pages that Infusionsoft tracking links and web form thank you page redirects go to could be personalized?

Until now, there wasn’t a WordPress plugin that let you do such a thing.

Infusionsoft allows you to create tracking links and include customer information such as their name and email address in the query string of the URL. Infusionsoft also allows your web forms to redirect to a thank you page on your site and include the web form data in the redirect link.

The challenge is that WordPress sites can SEE this data at the end of the URL , but can’t DO anything with it. So I wrote a plugin that can. Continue reading “Integrating Infusionsoft Links with WordPress”

Migrating from Movable Type to WordPress

Switching your blog from Moivable Type to WordPress can be a real challenge, especially if your URL structure has changed.

In my case, our blog posts were previously /blog/year/month/post_name_with_underscores.html and under WordPress were going to be simply /post-with-hyphens/

While there are many a fancy regex one can setup in their .htaccess file for 301 redirects, they often involve looping through a recursive regex to replace each individual underscore with a hypen, and then other regexes to do the rest of the work before finally redirecting.

There had to be a better way… Continue reading “Migrating from Movable Type to WordPress”

ClickBank Instant Notification Service in Perl

ClickBank is generous to provide code examples for many implementations of their Instant Notification Service, but… they don’t include Perl for some reason.

Here’s my Perl implementation.

use CGI;
use Digest::SHA1 qw(sha1_hex);
use Encode;

$q = new CGI;

sub ipnVerification() {
  my $secretkey = 'YOUR SECRET KEY';
  my $pop = "";

  foreach $field (sort($q->param))
  {
   unless ($field eq "cverify") {
      $pop .=  $q->param($field) . "|";
    }
  }
  $pop .= $secretkey;
  my $calcedVerify = sha1_hex(encode("utf8", $pop));
  $calcedVerify = uc(substr($calcedVerify,0,8));
  return ($calcedVerify eq $q->param("cverify"));
}

Enjoy!

Google Analytics Custom Variable Tracking Code Using The _gaq Global Object

Google Analytics Custom Variable Tracking Code
Google Analytics

This evening I was experimenting with adding custom variables to my Google Analytics tracking code, but when I checked Google’s custom variable documentation, it didn’t match the analytics code that I had.

Google Analytics changes their code for you to copy and paste quite often, seemingly every time I setup a new site to track.

The latest version of the analytics code that I was given used a new format, notably:

var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'youridhere']);
 _gaq.push(['_trackPageview']);
(function() {
 var ga = document.createElement('script');
 ga.type = 'text/javascript';
 ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
          'http://www') + '.google-analytics.com/ga.js';
 var s = document.getElementsByTagName('script')[0];
 s.parentNode.insertBefore(ga, s);
 })();

The docs say to put the _setCustomVar code in before pageTracker._trackPageview() … but I no longer have that older style setup.

After a bit of digging around, I came up with a solution from documentation on the _gaq Global Object. The _setCustomVar code can be added as follows:

_gaq.push(['_setCustomVar', index, name, value, opt_scope]);

Just put this after the last push line up top and you’re good to go.

Hopefully Google Analytics will update their docs to reflect the newer code style using _gaq, but in the mean time, this is working for me.