Saturday, September 30, 2006

Google Analytics

It's possible to use Google Analytics for analyzing the traffic onyour blog. Just add a HTML/Javascript page element on your page en paste the javascript Google generates in it. Best is it to put it somewhere at the bottom of your page. It gives great insight in the traffic and it's free.

Look here for Google Analytics.

Friday, September 29, 2006

Query Select random row

I was looking for a way to select a random row from a table, preferably in a stored procedure.
This is the query:

SELECT TOP (1) *
FROM table
ORDER BY NEWID()

Simple and effective!

Google adsense and changes in content

The number of visitors on my site is slowly increasing, so is the number of clicks on the Google ads. Problem is that the number of hits is growing faster than the number of clicks on the ads.
The main reason, I think, is my own content, so I changed the text a little. Google adsense doesn't react immediately, it will take 1 to 2 weeks voor Google to react on the changes.

More info: Google adsense

Coloring pages Cars (Pixar)

I discovered that where just a few good links available with coloring pages of Cars, the new Pixar animation movie.

So I added a few to Kids-n-Fun. So look
here for the coloring pages of Cars!

Create Dynamic headers in ASP.NET 2.0

Kids-n-Fun is a dynamic site. All content is stored in a database. I have some code (VB.Net) to create the content tags in the header dynamically.

If you using a Masterpage use this in the load event:
Dim myPage as new Page
Dim myHTMLHead as new HtmlHead
Dim myHTMLMeta as new HTMLMeta

myPage = thisPage
myHTMLHead =CType(myPage.Master.FindControl("MasterHeader"), HtmlHead)
myHTMLMeta.Name = "description"
myHTMLMeta.Content = "your description"
myHTMLHead.Controls.Add(myHTMLMeta)

myHTMLMeta.Name = "keywords"
myHTMLMeta.Content = "your keywords"
myHTMLHead.Controls.Add(myHTMLMeta)

If you don't use master pages (you should!) use this code instead:

myHTMLHead=CType(myPage.Header, HtmlHead)

The rest of the code is the same.

First blog

Well, welcome to my blog. I have created this blog to write about my experiences creating a brand new website Kids-n-Fun. This blog is about the things I discover along the way, about content, ASP.Net 2.0, search engine optimalisation, Google Adsense and so on.

Kids-n-Fun is a (dutch) website for kids. I have started with coloring pages, and create much more the coming winter. Pages voor crafts, recipes kids can make themselves. After that there will be a special corner voor parents, but more about that in the near future.

Enjoy!