Archive for March, 2008

Google is making a policy change for Adwords ads that is likely to make waves in the internet marketing community. As of April Google will require the display url of an ad to match the destination url exactly.

Here is what Google says:

Important Change to URL Policy Enforcement
Starting in April, display URLs for new ads will be required to match their destination / landing page URLs, without exception. Please adjust your URLs accordingly when creating new ads.

Wow – that is going to make a big impact on a lot of folks – mostly affiliate marketers who use these ads to shill other peoples products, but it will also affect people that just don’t have short urls for their landing pages – especially deep interior pages.

Take for instance you are using a long-tail keyword to sell a certain brand and model of shoe, you want to take that customer to that exact page on your site, odds are it will be a lengthy dynamic url such as:

http://golfshoestore.com/shopdisplayproducts.asp?catalog=6912&mfg=Oakley

Now how are you going to fit that in your ad’s display url? I believe Google does not allow redirected urls to be sued so its not like you can just create a shortened redirect url to solve this either.

Very interesting – I am going to have to hop around and see what others are saying about this.

Comments Comments Off on Adwords to require display url to match destination url

It’s common these days to take advantage of CSS Style Sheets to replace your headers like <H1> and <H2> with images. While this makes sites more attractive it also hurts some of your search engine value by losing the keywords that could be used in those important headers.

Well here is how to use images and still get your keywords picked up by the search engines.

<style type=”text/css”>
h1 {
padding-top: 35px; /* height of the replacement image */
height: 0px;
overflow: hidden;
background-image:url(“image.gif”);
background-repeat: no-repeat;
}
</style>

<h1>Keywords here</h1>

In this example your pretty image will be used but your keywords will still get picked up by the search engines. The nice thing about this approach is that you can actually get some keywords in there that you might not been able if you weren’t using images.

Comments 3 Comments »

I learned a handy trick today. I wanted to provide an external javascript so other websites could display some info from my site, but then realized it would be way better if I could somehow have them call a php file instead. Well you can.

So the page call will look just like the typical javascript call, except we are calling a php file:

<script language=”JavaScript” type=”text/javascript” src=”http://www.yoursite.info/yourfile.php”></script>

Now since you are calling the php file this way you need to make the php file appear to be a javascript document so to do that you need to add a Header property like this:

Header(“content-type: application/x-javascript”);

Then you need to make sure your output is in javascript format, since that is what you are outputting. So lets look at an example php file might look like – you can use this to try it out:

<?
Header(“content-type: application/x-javascript”);
$testvar=”what’s up doc?”;
echo “document.write(\”Bugs Bunny says: <b>” . $testvar . “</b>\”)”;
?>

Then just call that file. Notice I am using php’s echo to write out the javascript code document.write – if were to just echo it it would not show up on the page calling the javascript.

Ok, now lets get even fancier. We can pass some parameters to our file in the page call:

<script language=”JavaScript” src=”http://www.yoursite.com/yourfile.php?var=elmerfudd&ID=4″></script>

Then you can pick up those parameters in your php file using $HTTP_GET_VARS[] and do whatever you want with them.

Comments 4 Comments »

I had been stuck using my work’s web-based email interface for the last 6-months, so when they finally changed servers and I was able to move back to Outlook I was thrilled! It’s just much more organized and I am used to all the handy features as opposed to web-based sites. In fact, the one I was using wouldn’t even let me search in Firefox – so I had to reopen the site in IE every time I needed to search for an old email – ugh.

Anyway, since I was getting this fresh start in Outlook, I decided that I wanted to try something new, something I had only heard of in fairy tales – keep my Inbox empty!

Outlook LogoSo I have been at it a month and I am proud to say that I only have 34 items in my Inbox at the moment! Not bad for a guy that gets 50-100 a day (another 25 in my Gmail daily) and who has a history of nearly crashing mail servers with the backlog of emails he has amassed. Put it this way – I have over 9,000 emails in my Gmail!

So how am I doing it? Simply put I try to attend to every email as it comes in and then diligently delete the email immediately after taking care of whatever it was about, and then several times a day do a sweep through the Inbox and delete out what is not needed and flag anything that I still need to complete before deleting.

I had used flags before as a way to sort through the 1,000s of emails in my Inbox to see what important things I had missed. It was pretty useful – but now with so few emails in my Inbox it becomes almost a daily task list and keeps me focused on getting the items all done so I can have the pleasure of deleting them!

I will admit that I did have to create a couple folders off to the side that I could stash away things I thought I had better keep long term – and so far I haven’t deleted any of my Sent mails or emptied my Deleted Items folder either! I guess I am still a little nervous about losing something I may have needed – but hey that was not the goal to keep those empty – the goal was to “keep my Inbox empty” and so far so good! In fact since I started typing this post I deleted another email – 33 more to go!

Comments 2 Comments »

In an earlier post I described how to use conditional comment codes to call a different stylesheet for each browser like so:

<link href=”style.css” rel=”stylesheet” type=”text/css” />
<![if !IE]>
<link href=”not-ie.css” rel=”stylesheet” type=”text/css” />
<![endif]>

At the end of the post I mentioned that you can use these comments to hide other content from each browser. I received some questions on this so I thought I better explain further.

To hide content from IE or a certain version of Internet Explorer is simple just use the appropriate comment codes anywhere on the page with the content between them like so:

The above examples will hide the content from IE or the IE version you specified in teh codes – HOWEVER it will only work that way in IE, because conditional comment codes are not read by Firefox.

So to hide content from Firefox you need to use your Firefox only stylesheet you declared in the header of your file. Whatever it is you want to hide in Firefox just wrap in a <div> with a class or id that in your Firefox stylesheet you add the css property of display: none.

So here is an example:

<div id=”hidemefromfirefox”>
CONTENT TO HIDE FROM FIREFOX
</div>

Then in your Firefox only stylesheet you declare:

#hidemefromfirefox {
display:none;
}

Comments Comments Off on Use conditional comment to hide content from Firefox or Internet Explorer

These tags will emphasize to Adsense what portion of your page Adsense should use to find relevant ads:

<!– google_ad_section_start –>
GOOD CONTENT HERE
<!– google_ad_section_end –>

You can also block off sections that you do not want to be picked up by Adsense by adding a (weight=ignore) to the start tag:

<!– google_ad_section_start(weight=ignore) –>
BAD CONTENT HERE
<!– google_ad_section_end –>

This is handy for blocking out headers, footers, sidebars, menus or whatever portions of your site don;t use your desired keywords. This can also come in handy when you post something on a blog that all of sudden changes all your ads to something wacky.

Be careful though – if you don’t provide enough content within the tags you will actual lose relevancy and may even get stuck with Public Service Ads.

Read more on section targeting from Google

If these tags are working for you – here is a great post to read, it’s a few years old but all the tips are still valid ways you can use to increase ad relevancy on your site.

Comments Comments Off on Getting more relevant Adsense ads with Section Targeting

I have always preferred including a menu file on my sites rather than repeating them on all the pages for the obvious reason that menu items sometimes change and it easier to change one file than change the links on all the pages that show that menu.

So anyway, recently I have also wanted to use CSS to highlight the active or current page the user is on using CSS, this is easy to do when the menu is on each page, but requires a little PHP when using a single menu included across your site.

So anyway here is my solution:

Here is the code for the navigation menu – I save this as a file called menu.php

<?php
$active[$current] = “class=active”;
?>

<ul>
<li <?php echo $active[1] ?>><a href=”index.php”>Home</a></li>
<li <?php echo $active[2] ?>><a href=”services.php”>services</a></li>
<li <?php echo $active[3] ?>><a href=”print.php”>print</a></li>
<li <?php echo $active[4] ?>><a href=”web.php”>web</a></li>
<li <?php echo $active[5] ?>><a href=”marketing.php”>marketing</a></li>
<li <?php echo $active[6] ?>><a href=”portfolio.php”>Portfolio</a></li>
<li <?php echo $active[7] ?>><a href=”contact.php”>Contact</a></li>
</ul>

Then, just include the menu on your pages and indicate which of the menu links you want to give the CSS style “active”:

<?php $current = 3; include(“menu.php”); ?>

Lastly, don’t forget to declare a visual style for the css class “active” to make the current page link stand out from the others.

VARIATION – You can also change the menu code slightly to make the active page not linkable at all – this will further make the current page stand out from the other menu options. Here is an example of the code you would use for the links:

<li <?php echo $active[1] ?>><?php if ($current != 1) { echo “<a href=\”index.php\”>home</a>”; } else { echo “home”; } ?></li>
<li <?php echo $active[2] ?>><?php if ($current != 2) { echo “<a href=\”web.php\”>web</a>”; } else { echo “web”; } ?></li>

Comments 2 Comments »