Part-Time Sales Job In Denver

April 12th, 2010
0 comments Uncategorized posted by Cavan

The time has finally come for us to start adding to the Adrogen team.

First on the list is hiring a business development specialist. Since we started in 2008, it’s become apparent that we lack the time, if not the skill, to do ourselves justice when it comes to developing new clients and partnerships. That hasn’t stopped us from growing, but we’ve reached a point where we need a dedicated position for that role. We’re looking for someone to start in May on a part-time basis, but the opportunity will be there to move to full-time later on. If you or someone you know might be a good fit, here’s the link for full details on our part-time business development position.

Google Analytics Time of Day

February 3rd, 2010
1 comment Google Analytics posted by Cavan

When we walk clients and partners through Google Analytics, one of the most frequently asked questions is, “Can I break my traffic down by time of day?”  Yes you can, and here’s how:

  1. Log into Google Analytics
  2. Select “View report” next to your domain name
  3. Select “Visitors” from the navigation in the top left corner
  4. Click “Visitor Trending” and then select “Time on Site”
  5. Below the date range in the top right corner, you’ll see a line that says, “Graph by:” with four icons next to it. These icons represent hour / day / week / month. Analytics Time Screenshot
    Select the first icon (a clock) and it will break down your traffic for that date range by time of day. If you want to see the time of day for a specific day, just change both fields of the date range to the same day.

One interesting note about how Google Analytics tracks traffic by time is that each session expires at the end of the day.  What this means is that visitors beginning their session before midnight and carrying over into the next day will be split into two visits.  So, websites that are heavily trafficked late at night and into the early morning might see a higher number of visits, but less time spent per visit, as their traffic gets divided by the new day. [source]

Troubleshooting:  There’s not a lot that can go wrong with tracking visitors by time of day, as long as the time zone in the account is correct. By default, all accounts in the U.S. are set to Pacific Time. If your Analytics account is not linked to an AdWords account, you’ll be able to set your time zone preference from the Profile Settings page. If your Analytics account is linked to a Google AdWords account, your time zone is set to your AdWords preference, and can only be managed through that account.

New Citations Added to Google Local Business Listings

May 27th, 2009
0 comments Local Search posted by Cavan

Last week, David Mihm noted that Steve Espinosa had reported seeing Twitter profiles showing up as local business citations. In doing some local listing research for another post, I came across not only examples of Twitter as a citation, but Facebook and MySpace as well.  I hadn’t seen either of these mentioned as general sources of citations, so I thought I would make a note of it. It didn’t take long to find examples of a restaurant’s official Twitter page listed as a citation or a customer’s tweet as a citation. twitter-citation

That same restaurant in the first link is also credited with a citation for their Facebook page.  I was curious as to whether mentions of a business on other Facebook and MySpace pages were also being credited as citations along with their official pages, and wouldn’t you know it, they are.facebook-citation

It will be interesting to see the speed with which businesses are credited citations from these sources and their overall value compared to other accepted citation sources.

Email not Sending to Same Domain?

May 8th, 2009
5 comments Email posted by Pete

Have you ever run into the problem where you are setting up a contact form, or something similar, and then having the contact form email you at an email address that’s on the same domain, and then** you mysteriously don’t get the email?

For example:
My contact form is at:

http://www.mysite.com/contact/

The email address my form sends to using PHP’s mail() function is:
me@mysite.com

Ok so, looking good yeah? But I don’t get the email. So I switch where the email is going to a placebo account, say “me@gmail.com” — And then I GET the email. So the form obviously works, but there’s a disconnect happening somewhere.

What I’ve discovered is that this problem most likely occurs if you are pointing your MX Records and A Records to different places. I, for example, am using a 3rd party hosting company to physically host this website, but I’m using Gmail to handle my email.

What happens is your server most likely has a firewall setup so that any email coming through from your domain to an email on your domain is filtered. IE, your server looks it up and says “Hmmm… there isn’t an email setup by any name that this form is trying to send to. I will henceforth banish thee to oblivion.” And then it casts a magic spell it learned from Gromak the Incorrigible, and then (HAH! had to) your email simply dissolves peacefully, or so we can hope, into the ethereal where it will exist in limbo, haunting you for the rest of your days. Most likely.

The Fix:
Basically you have to configure your server so IT knows (not just the rest of the free world) that you are using an outside service to handle your mail.

In Cpanel:

  1. Click MX Entry
  2. In the table, find the domain your trying to configure and click it under the “MX Entry” column. This should allow you to edit it.*
  3. Change it to the MX Record of your mail provider. For example, I use Gmail, so I set it to ASPMX.L.GOOGLE.COM
  4. Press “Change” and voila. Many Roman women will abruptly appear, draping themselves over your suddenly bulging, muscular body as you bath in the glory of your fastidious conquest. Or you’ll just be able to send mail from your form. Either way: Awesomeness ensues.

Now, granted, these are just the instructions for CPanel, but it should work regardless of your system setup, the steps just may be a little different. The idea here is that you want to tell your server that you aren’t using them for mail, essentially updating the SMTP Localhosts records so they know which to use.

Happy days.


* It should probably be set the same as your domain. This is whats causing the problem
** I’m trying to break the record for as many “and then”’s in one sentence as possible **fingers crossed!**

PHP Checkbox Arrays and JavaScript and YOU!

April 17th, 2009
1 comment JavaScript posted by Pete

Have you ever had to collect a series of values from check boxes, or any other input for that matter and put them in $_POST arrays to save precious precious lines? Ala:




Great right? Because when the form is executed all values of “this_one” that were checked are conveniently stored in the array:

$_POST['this_one']

But… wait a sec… what if you have some validation going on with this form and you have to use a client side script such as JavaScript to check whether or not those boxes are checked.

With the above HTML, you can’t use:

var chks = document.form_name.this_one;

OR

var chks = document.form_name.this_one[];

So what’s a young man or woman to do?

Dry those tears buttercup, the answer is simpler than you think! Just change the way you’re accessing your checkboxes (or input elements). This way you can use your fancy PHP Array AND do your JavaScript validation, ala:

The Fix:

var chks = document.getElementsByName('this_one[]');

Now you can run a JavaScript loop:

var chks = document.getElementsByName('this_one[]');
var the_checked = false;
for (var i = 0; i < chks.length; i++) {
	if (chks[i].checked) {
		the_checked = true;
		break;
	}
}
if (the_checked == true) {
	alert('Cannot Proceed!  At least one box is Checked!');
	return false;
}

AND still get your nice PHP Array:

print_r($_POST['this_one']);

And it validates! The world... the sun moon and stars... they be happy now.

JQuery Flicker in Firefox

February 9th, 2009
20 comments JQuery posted by Pete

Wow. Ok, here’s an interesting one.

So, I’m building a slider for a client where you have a container DIV with a number of child DIV’s inside of it to display individual pieces of content per slide. The premise of this is the same as a number of sliders that are out there built in JQuery. Upon a click, the DIV just moves to the left or right to display different parts.

The way you normally hide everything that’s not appearing in the window is by using:

div { overflow: hidden; }

Easy enough. Or so I thought. The problem here is very specific. It actually only occurs on PC versions of Firefox, and even then, only when the content is sliding behind other content on the page. For example, if my slider is floating to the right, and I have some different content floating to the left, as the slider is sliding, the content on the left will start flickering uncontrollably in Firefox on the PC.

This boggled my mind. Especially as it didn’t occur in any other browser out there, even IE6. The solutions going to kill you… well maybe… it killed me.

The Fix:
Simply specify the plane of the overflow.  So, if your slider is going horizontally use:

div { overflow-x: hidden; }

And if your slider is going vertically use:

div { overflow-y: hidden; }

Yeah… That’s it.  Literally about 2 hours of head scratching and teeth gnashing and nearly window punching boiled down to the addition of 2 lousy characters.

Well, live and learn right?  Hopefully if you’ve found this post and have the same problem you can save yourself some tape dispenser hurling.

WordPress wp-blog-header.php Causes 404 in IE

January 21st, 2009
35 comments WordPress posted by Pete

I ran into a very interesting problem today. WordPress is great as a CMS, but sometimes for special functionality on specific pages you just need to go outside of the shell, but the great thing is, you can still use the framework right? By including

<?php require('./wp-blog-header.php'); ?>

on the top of your page, you still have access to all the WordPress functions and code library.  Which is great, because if your Navigation is built through a WP page hierarchy, you can still have access to it, and any changes in the backend will be reflected on your orphaned page.

All is right with the world.

Or so it seems.  The underlying problem with this is when you include the all encompassing “wp-blog-header.php” it tries to put this page in the framework.  And the way the framework operates when permalinks are in place is completely database driven.  So if an actual file exists in a sub directory, but it isn’t a part of the WordPress hierarchy, WordPress sends out a 404 header.  Now there’s a conflict, because the browser is getting a 404 header, but a file actually exists in the location.  Firefox and some versions of IE interpret this fine, but some versions of IE don’t.  And more importantly, neither does Googlebot… which means you’re page isn’t going to get indexed.

Fortunately, there’s a relatively easy way to get around this.  Basically, don’t include wp-blog-header.  I can already hear the virtual screams:

But but but!  I want the tags!  Isn’t that the whole point?! *anger* *confusion* *lamentations*

It’s definitely the point.  And luckily, there’s a relatively easy way to accomplish this.  Basically, we just want to include the specific functions of WordPress without making this specific page or pages part of the CMS.  So don’t include wp-blog-header.php at the top.  Use this instead:

<?php
       require('./wp-config.php');
       $wp->init();
       $wp->parse_request();
       $wp->query_posts();
       $wp->register_globals();
?>

This will only pull the specific framework functions without putting the page as a part of the whole.  In essence, WordPress won’t look for the corresponding page or post with “/your-sub-directory/”, but you’ll still be able to use all of the functions such as wp_head().

And you thought nonsensical 404’s couldn’t be fun… for shame.

jQuery: $ is not a function

December 30th, 2008
28 comments JQuery, WordPress posted by Pete

Recently I ran into an issue  while trying to use jQuery on a custom WordPress based Content Management System.  This particular system had a number of instances in which the framework was being referenced.  Normally you insert jQuery code using the dollar sign ($) like so:

$(document).ready(function() {
   $("a").click(function() {
     alert("Hello world!");
   });
 });

The problem arises when a different system grabs the $ variable.  All of the sudden you have multiple $ variables being used as objects from multiple libraries, resulting in the error console message “$ is not a function”.

Fortunately there is a pretty easy way of fixing this in the form of jQuery.noConflict.  Running this function gives control of the $ variable back to whichever library first implemented it.  This will help to ensure that jQuery won’t conflict with other instances of the $ object in other libraries.

But please note, in doing this, you are re-assigning the variable so you will only be able to access jQuery commands using the ‘jQuery’ variable (which has just replaced ‘$’).  So our above code example would look something like this:

jQuery.noConflict();
jQuery(document).ready(function() {
   jQuery("a").click(function() {
     alert("Hello world!");
   });
 });

It doesn’t seem to be a very common problem and only occurs when multiple instances of the object crop up, but that’s easy to do in WordPress when multiple plugins begin conflicting with each other.   Follow the link for the  full jQuery documentation on jQuery.noConflict