Jared Stenquist » Posts in 'Computers & Internet' category

How-to: Enable page speed tracking in Google Analytics

The latest version of Google Analytics has a very nice feature called “Page Speed”. You’ll see the new tab underneath the content section…

I wondered why i had no data under site speed. After some research I found that I needed to modify the GA javascript to include a directive for page speed. You’ll need to add _gaq.push(['_trackPageLoadTime']);   to the inline  javascript as shown here..

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-858386-1']);
  _gaq.push(['_trackPageview']);
  _gaq.push(['_trackPageLoadTime']);

...continued...
</script>

After you save your modified file(s), you should begin to see data within 24 hours. Google tracks a small sample of pageviews and averages them all. You’ll see a page by page breakdown of speeds and how many times that page was sampled. This is helpful for finding outliers.

Google Page Speed

Pros: Nice data over time in a GUI with 2 seconds of work. Breakdown of individual page speeds.

Cons: Using this method fires an additional request to google for a second tracking pixel. Generally you shouldn’t notice this addition.

Posted in Computers & Internet, Sysadmin, Web Development

This new Firefox plugin will blow your mind (if you’re a web developer)

I just had a chance to try out an incredible new plugin for Firefox called “Tilt”, which allows you to see a 3D model of any websites DOM structure. To give it a try, check out mozilla hacks website or directly download the XPI file.

Here is a screenshot of the CampusLIVE team page inside the view. Cool!

Tilt

Posted in Computers & Internet

Downloading files from YouSendIt directly to a linux server using lynx

I am frequently sent large zip files of photos or videos from clients, which I need to download and then FTP to their website. I decided today to find a different way to do this so I could bypass the long process of uploading GBs of files.

1) Go to your email from YouSendIt and right click on the download button. Copy this link.

2) SSH into your server.

3) Issue the “lynx” command to open a text-based browser

lynx https://rcpt.yousendit.com/1258529888/2f2b4adaf69882f770

4) Anytime you are prompted for a cookie or SSL error, just follow the prompt by pressing “y” or “Y”

5) Once the page loads, you just hit the down key until you get to the link to the file. Then hit the right arrow key to start the download.

6) exit lynx (ctrl + z)

7) locate the file that was downloaded. It’s likely in the folder you’re currently in.

8) unzip the file

unzip nameoffile.zip

Posted in Computers & Internet, Sysadmin, Uncategorized

Forcing a splash page redirect one time with wordpress, php and cookies

I hate splash pages and never ever suggest using one to any of my web development clients. After all, it just delays the user from getting to what they are looking for – your content. Unfortunately sometimes you get a client that doesn’t listen to your recommendations, even when supported with tons of supporting articles against splash pages like these…

Sink the Splash Pages
Splash Pages: Bad for Usability, Bad for SEO
Splash Pages: Do we really need them?

So if you’re building a website with WordPress and you have a client that despite the horrible idea, demands a splash page, I have a solution for you.

1) Edit header.php (inside your theme folder), adding this to the top

This code checks to see if the cookie “no_splash” is set. If the user hasn’t seen the splash page before, they’ll be redirected to the splash page… splash_page.php (which we create in step 2)

<?php
if(!isset($_COOKIE['no_splash'])) { // Start of the IF statement - if the user does not have a cookie that says whether he/she has visited the splash page, take them to the splash page
header('Location:http://www.yoururlhere.com/splash_page.php'); // Redirect code
} else { // But... if they do have the cookie (they have been on the splash page), just serve the page as normal
//.... do page here
}
?>

2) Create a file called splash_page.php and put it in your site root

At the top of the file we need to add the code to create the cookie, so that next time they come to the site they don’t see this horrible splash page.

<?php $expire = time() + 60*60*24; // This means, expire in 1 day - 60 seconds * 60 minutes * 24 hours setcookie("no_splash", "1", $expire); // This makes the cookie. It goes in this order: setcookie(cookie_name, cookie_value, expiry_time) // Do splash page from here down.... ?>

Below this code you will put your HTML for the splash page.

3) You promise to never create another useless splash page!

 

Posted in Computers & Internet, Wordpress

Review and Tutorial For Amazon AWS Route 53 DNS service

Amazon is on fire adding new features to their Amazon Web Services (AWS) lineup. It seems like ever month a new major product is released, and I inevitably have to stop what I’m doing and hack something together with it. Route 53 is Amazon’s answer to DNS-As-A-Service, competing with the likes of UltraDNS, EasyDNS, Dynect and others. As a CTO/sys-admin, this is in intriguing service, because running my own DNS takes time, monitoring and money. Except for the lack of a GUI (which I’ll get into later), I think this service is awesome.

Pricing

$1/month/zone +
$0.50 per million queries – first 1 Billion queries / month
$0.25 per million queries – over 1 Billion queries / month

For the average/moderate/large website, this is an extremely nominal line item.

Setup

AWS Needs a GUI for Route 53

This was harder than it had to be, due to the fact that there isn’t an official  GUI to manage your zones from within your AWS manager. After signing up I expected a new tab to appear in my management console. Much to my surprise, you need interface with an API to add/edit/delete zones. Isn’t this 2011? Seriously, how long could it take them to create a tab in here to make everyone’s lives easier?

This is where some entrepreneurs come in and build a business around creating GUIs for Amazon’s CLIs. DNS30.com is a simple front end for the Route 53 service that simply works. You enter your AWS authorization keys and then create zones using simple forms. For my setup I was simply moving all my DNS from in house servers to AWS, so I didn’t have to worry about downtime.  My steps were:

1) Order Route 53 Service
2) Create new set of Authorization Keys for DNS30.com to use, separate from the one I use to spin-up servers with.
3) Signup for beta DNS30.com service. Once logged in and setup, it will give you 4 AWS nameservers to use.
4) Create identical resource records on DNS30 from my current zone file
5) Test that zone is working correctly using DIG…. # dig @ns-xyz.aws-dns.org mydomain.com a
6) Once I verify that AWS is returning correct zone data, I went to my registrar and pointed my domain to the AWS provided nameservers.

Testing

Testing Amazon AWS Route 53 with DIG

As I mentioned earlier, using DIG at the command line is an easy way to test DNS response times. It appears from my tests that the AWS Route 53 dns servers are slightly slower than my homebrewed VPS setup, but 10 milliseconds isn’t the lowest hanging fruit in my site optimization strategy for CampusLIVE. The example test resulted in a 70ms response time.

jared@ubuntux:~$ dig @ns-335.awsdns-41.com campuslive.com a

 

 

 

Posted in Amazon AWS, Computers & Internet

Netflix should offer an ad-supported free subscription

I was catching up on some episodes of Parks & Recreation last night on my Netflix connected XBox (awesome). All of the TV shows on Netflix have zero commercials. I find this interesting because the actual reason I pay $9/month for Netflix is not because of it’s commercial free content, but because I get to watch TV on my schedule. It’s convenient. Regular TV doesn’t allow this. In fact I’d still pay $9/month if every TV show and movie had commercial breaks in it.

So why doesn’t Netflix offer a free version of it’s service with commercials in the TV shows and movies? It can’t be too difficult to monetize this enough to earn at least $9/user/month. Or let’s say someone has to watch at least 4 hours of programming a month for them to break even with advertising – well, just bill them $9 if they watch less than 4 hours in programming per month.

Consumers like free. We like to enjoy entertainment on OUR schedule. We have accepted that ads are part of life.

Posted in Business, Computers & Internet

Funny possibility for where the Chrome logo came from

Posted in Computers & Internet

Facebook Dis-Connect

It’s getting to the point where Facebook’s developers should just include a “Give My Life Away” button for Facebook Connect. What percentage of people actually click through and allow an untrusted app ALL of this information? The conversion rates must be awful.

From my experience with CampusLIVE – asking for this many permissions from the user typically puts the Allow button below the fold so it’s not even click-able. This happened to us with 8 requests. RockMelt has an amazing 11 requests for information.

Rockmelt Facebook Dis-Connect

Posted in Computers & Internet, Technology, Unbelievable

HTML5 shows some balls

Damn, can you believe that HTML5 is already showing such promise? If Googlers can put this together on their 20%, there is an incredible potential here.

http://tcrn.ch/9n2hHP

Posted in Computers & Internet

The oftentimes prohibitive cost of data

When costs for a particular product or server get prohibitively high, typically in a monopoly situation, it’s a great time for a startup to come in and level the playing field. Competition is the golden key to creating a price point that matches supply and demand.

Yesterday i reached out to a company i found online that offered movie time data and a cool affiliate program that could let my site visitors buy tickets, creating a nice affiliate revenue stream. In the ideal world, the data stream would be free, which would then increase the amount of tickets sold through a now increasing amount of affiliates. In this theoretical world, the movie producers would think logically and offer this data to anyone, knowing that more access to tickets = more sales = greater profit.

The pricing i received back from the company was somewhere between mind-blowing and ludicrous. $3,500 PER MONTH to access the data. That’s $42,000 a year. Absolutely ridiculous. Of course they also have a similarly crazy pricing plan where you pay $0.25 per screen per week. So for a typical 12 screen theatre, you pay $12/month just to see what times movies are playing. Now of course if you try to build any sort of national app that integrates a users geo-location, you’re looking at much more than $3,500 a month if paying on a per screen basement.

I’m sure somewhere in this company a sales guy is doing the math for us entrepreneurs – Why spend $15,000 a month by paying per screen when I can get you EVERY screen for just 12 easy payments per year of $3,500.

If anyone hears of a better alternative, somewhere in between scraping the data and paying through the roof for it, i’d love to hear from you.

Posted in Business, Computers & Internet